Sophie

Sophie

distrib > Mandriva > 2010.0 > x86_64 > by-pkgid > c27466c2a3fa3cf6008c3a485d00ce04 > files > 96

jetty5-manual-5.1.15-1.5.2mdv2010.0.noarch.rpm

SECTION: 200-General
TITLE: handler
QUESTION: Why do I see my JSP source?

There is a common type of misconfiguration of Jetty that will often
result in the source of a JSP, webmacro or other dynamic page
being served rather than the generated content from that page.
<P>
In Jetty, HttpHandlers are order dependant and requests are passed
to the handlers in the order they were defined.   Thus if a ResourceHandler
is defined with:<PRE>
  context.setServingResources(true);
</PRE>
or <PRE>
  context.addHandler(new ResourceHandler());
</PRE>
before a servlet or other dynamic content handler has been added and/or
configured, then the ResourceHandler will server the source of the
JSPs, webmacros, etc. before the servlet can be invoked.