error from tomcat. Here is my web.xml:

<servlet>
<servlet-name>HelloServlet</servlet-name>
<servlet-class>HelloServlet</servlet-class>
</servlet>

<servlet>
<servlet-name>HelloServlet2</servlet-name>
<servlet-class>coreservlets.HelloServlet2</servlet-class>
</servlet>

<servlet-mapping>
<servlet-name>HelloServlet</servlet-name>
<url-pattern>/classes/HelloServlet</url-pattern>
</servlet-mapping>

<servlet-mapping>
<servlet-name>HelloServlet2</servlet-name>
<url-pattern>/classes/coreservlets.HelloServlet2</url-pattern>
</servlet-mapping>

</web-app>

when I went to the following urls after I had edited web.xml to the above,

http://localhost:8080/cucoweb/classes/coreservlets.HelloServlet2
http://localhost:8080/cucoweb/classes/HelloServlet

I go the expected results, ie, 'Hello(2)' and 'Hello'. Then I shutdown
tomcat and restarted it.
And when i tried to access those 2 urls again, I got the above error.

(Actually I had the same web.xml before except that it didnt have the
/classes in front in the
url-pattern. I was able to access it by the same url - without the /classes
- and then the next day
when started tomcat and tried to access it, it didnt work, same error.)

In this example, cucoweb is the context root, correct ? Shouldn't the
url-pattern be relative to the
context root ? Thats how I have it now, I think.

Would adding my webapp directory, ie cucoweb/classes, to my CLASSPATH help ?

I'm in ubuntu, when I do echo $CLASSPATH, I get :

.:/usr/lib/jvm/java-6-sun-1.6.0.00/lib:/usr/lib/jvm/java-6-sun-1.6.0.00/imq/lib/:/usr/lib/jvm/java-6-sun-1.6.0.00/jre/lib

I havent tried this yet because doing this is kind of tricky in ubuntu. (You
have etc/environment and
bash.bashrc, for ex.) But if I try that and it works I will post about it. I
suspect its something else,
though, because it worked once, before restarting tomcat, thats why I'm
posting here first.
Any info, even educated guesses, would be greatly appreciated. Thanks in
advance. 
-- 
View this message in context: 
http://www.nabble.com/web.xml-configured-correctly%2C-but-still-getting-%27404...resource--not-found%27-tp14717184p14717184.html
Sent from the Tomcat - User mailing list archive at Nabble.com.


---------------------------------------------------------------------
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to