tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From steven melendez <>
Subject RE: new web application - inconsistent resource not found
Date Thu, 16 Jan 2003 23:56:17 GMT
Thank you very much for your suggestions and help.

I created a simple test servlet and added:


to the web.xml and was able to call the servlet with

I've been following a book which suggesting that I
just add the following to the web.xml for the servlet:
(assume directory structure:
webapps\directoryname\WEB-INF\web.xml   )


and then suggested that I could access the class
through the following:


but this didn't work for me until I added the servlet
mapping above.  so is the book wrong and I should
always add a mapping or am I missing something else?

thanks again.

--- Wendy Smoak <> wrote:
> 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
> now.
> 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

Do you Yahoo!?
Yahoo! Mail Plus - Powerful. Affordable. Sign up now.

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

View raw message