tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Christopher Schultz <>
Subject Re: 404 for JSPs
Date Wed, 23 Dec 2009 16:24:55 GMT
Hash: SHA1


On 12/20/2009 9:32 PM, Clay McCoy wrote:
> When I run embedded Tomcat my jsps 404, but my servlets work. When I
> run standard (by putting my war on the Tomcat/webapps directory) my
> servlets 404 but my jsps work (without any css). Can anyone shed some
> light on this? My startup script for embedded is here:

- From reading all the information you provided, I would guess that, in an
embedded environment, Tomcat does not automatically read conf/web.xml to
configure the default webapps provided by Tomcat (when /not/ running

Specifically, you are missing the definition of the JspServlet and the
DefaultServlet. The JspServlet is usually mapped to *.jsp and *.jspx and
(duh) provides JSP capabilities for those URIs. The DefaultServlet is
usually mapped to / (meaning "everything that doesn't match anything
else) and provides the typical plain-old file serving for things like
static content (*.css, etc.).

I suspect that, since you are running in an embedded environment, you
will have to explicitly load these definitions. I'm not familiar enough
with the embedded API to know if you can load more than one web.xml file
for a single Context, but this is essentially what you'll need to do.
You might want to merge conf/web.xml into your webapp's WEB-INF/web.xml
file if you are always going to run your webapp embedded in this way:
you'll save yourself a lot of headache by doing it this way.

Hope that helps,
- -chris
Version: GnuPG v1.4.10 (MingW32)
Comment: Using GnuPG with Mozilla -


To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message