tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Wendy Smoak <>
Subject RE: new web application - inconsistent resource not found
Date Thu, 16 Jan 2003 23:09:41 GMT
Steven wrote:
> What I have is a couple of jsp files and a couple of
> servlets.  I put them in the examples directory, the
> jsp in the top level, and the servlets in the
> web-inf/classes directory.  I do not edit the web.xml
> in this directory, and the application works.

WEB-INF should be capitalized.  Might not matter on Windows, though...

web.xml goes directly in WEB-INF, not in WEB-INF/classes.

What is the URL you are using to access your servlet when it works?  When it
doesn't?  The examples webapp has the invoker servlet enabled, so you can
get to servlets with the .../examples/servlet/MyServlet URL without changing
web.xml.  That may not be true elsewhere.

> <servlet>
>    <servlet-name>AddToSC</servlet-name>
>    <servlet-class>cart.AddToSCServlet</servlet-class>
>  </servlet>

Is this servlet in the /WEB-INF/classes/cart directory, and does it have
  package cart;
in the code?  If not, save yourself some future trouble and start packaging
your code now, even if you just dump everything in "package mystuff;" for

Where's the <servlet-mapping> tag?

The fact that things do work in examples probably means you're just missing
a few details.  If you're still having trouble, post a directory listing of
what's where, and your web.xml file. 

Wendy Smoak
Applications Systems Analyst, Sr.
Arizona State University PA Information Resources Management

  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message