Fixed. There was a parse error at context.xml, line 20, column 2. The offending line:
<Context path="" docBase="webapps/ROOT" debug="0" reloadable="true" > crossContext="true"> > </Context> I read somewhere that you were supposed to do this. Evidently bad info or old info. Thanks for all the replies. cuco2772 wrote: > > Check this out, I did 'touch web.xml' then hit reload in the browser > window and it worked. > If I restart tomcat though, it probably wont work as before. > Here's what my catalina.out looked like after that: > > [EMAIL PROTECTED]:/usr/local/tomcat/apache-tomcat-6.0.14/logs# tail -f > catalina.outJan 9, 2008 1:48:32 PM org.apache.jk.common.ChannelSocket init > INFO: JK: ajp13 listening on /0.0.0.0:8009 > Jan 9, 2008 1:48:32 PM org.apache.jk.server.JkMain start > INFO: Jk running ID=0 time=0/36 config=null > Jan 9, 2008 1:48:32 PM org.apache.catalina.startup.Catalina start > INFO: Server startup in 1455 ms > Jan 9, 2008 2:30:03 PM org.apache.catalina.startup.HostConfig > checkResources > INFO: Reloading context [/cucoweb] > Jan 9, 2008 2:30:03 PM org.apache.catalina.core.StandardContext stop > INFO: Container > org.apache.catalina.core.ContainerBase.[Catalina].[localhost].[/cucoweb] > has not been started > > Not sure what the last line means. > Incidentally, when compiling the servlet, I had to use the classpath > option, ie javac -classpath to tell > javac where the servlet-api.jar is in tomcat. This seems weird to me that > the servlet interface is not in > the Java EE SDK, or if it is, it doesnt know where to find it. > > > David Smith-2 wrote: >> >> The tomcat startup script set's it's own classpath, ignoring the >> environment set classpath. This has been the case since tomcat 4. >> Tomcat 3 used to be a real headache because of the need to set a >> classpath. If I remember correctly, tomcat 3.3 was the first version to >> start offering a classloader architecture instead of making people work >> the classpath. >> >> Us the -n option of tail to get more log info like tail -n 100 >> catalina.out. See if you can get more of the log file since there >> appears to be an error message in there further up. >> >> --David >> >> cuco2772 wrote: >> >>>The guide I've been using for trying to set this up is the coreservlets book >>>by Marty Hall. He says set the >>>classpath but the info there is for tomcat 4. Are you saying I could just >>>get rid of the classpath >>>environment variable entirely and it wouldn't make any difference ? (I did >>>set it to where the jvm is) >>> >>>Here is the output of 2 of my tomcat logs : >>> >>>[EMAIL PROTECTED]:/usr/local/tomcat/apache-tomcat-6.0.14/logs# tail -f catalina.out >>>Jan 9, 2008 1:48:32 PM org.apache.catalina.core.StandardContext start >>>SEVERE: Context [] startup failed due to previous errors >>>Jan 9, 2008 1:48:32 PM org.apache.coyote.http11.Http11Protocol start >>>INFO: Starting Coyote HTTP/1.1 on http-8080 >>>Jan 9, 2008 1:48:32 PM org.apache.jk.common.ChannelSocket init >>>INFO: JK: ajp13 listening on /0.0.0.0:8009 >>>Jan 9, 2008 1:48:32 PM org.apache.jk.server.JkMain start >>>INFO: Jk running ID=0 time=0/36 config=null >>>Jan 9, 2008 1:48:32 PM org.apache.catalina.startup.Catalina start >>>INFO: Server startup in 1455 ms >>> >>>[EMAIL PROTECTED]:/usr/local/tomcat/apache-tomcat-6.0.14/logs# tail -f >>>catalina.2008-01-09.log >>>Jan 9, 2008 1:48:32 PM org.apache.catalina.core.StandardContext start >>>SEVERE: Context [] startup failed due to previous errors >>>Jan 9, 2008 1:48:32 PM org.apache.coyote.http11.Http11Protocol start >>>INFO: Starting Coyote HTTP/1.1 on http-8080 >>>Jan 9, 2008 1:48:32 PM org.apache.jk.common.ChannelSocket init >>>INFO: JK: ajp13 listening on /0.0.0.0:8009 >>>Jan 9, 2008 1:48:32 PM org.apache.jk.server.JkMain start >>>INFO: Jk running ID=0 time=0/36 config=null >>>Jan 9, 2008 1:48:32 PM org.apache.catalina.startup.Catalina start >>>INFO: Server startup in 1455 ms >>> >>>So its saying Context startup failed, but I have no idea how to determine >>>what the 'previous errors' are. >>>FWIW, I am running tomcat through apache, not as a stand alone server. >>> >>> >>> >>>David Smith-2 wrote: >>> >>> >>>>Messing with the classpath will bring you nothing but pain and misery. >>>>I would strongly recommend you leave it alone. >>>> >>>>Also the servlet mappings are relative to the context so your good on >>>>that front as well. >>>> >>>>Are there any messages in your tomcat logs regarding the request? Are >>>>you sure the webapp is running after you restart tomcat? >>>> >>>>--David >>>> >>>>cuco2772 wrote: >>>> >>>> >>>> >>>>>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. >>>>> >>>>> >>>>> >>>>> >>>>--------------------------------------------------------------------- >>>>To start a new topic, e-mail: users@tomcat.apache.org >>>>To unsubscribe, e-mail: [EMAIL PROTECTED] >>>>For additional commands, e-mail: [EMAIL PROTECTED] >>>> >>>> >>>> >>>> >>>> >>> >>> >>> >> >> >> --------------------------------------------------------------------- >> To start a new topic, e-mail: users@tomcat.apache.org >> To unsubscribe, e-mail: [EMAIL PROTECTED] >> For additional commands, e-mail: [EMAIL PROTECTED] >> >> >> > > -- View this message in context: http://www.nabble.com/web.xml-configured-correctly%2C-but-still-getting-%27404...resource--not-found%27-tp14717184p14723539.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]