Jim, To get your system up and running again, why don't you just extract the Tomcat 4.0.1 zip file again. It will overwrite any files you might have corrupted. Then, you can edit the examples/WEB-INF/web.xml file and add a servlet entry to map your HellowWorldServlet to an alias if you want to.
-Richard At 12:26 PM 12/2/2001 -0800, you wrote: >I'm pretty sure it is not an error in the server.xml. As an experiment, I >tried remarking out the Tomcat-Apache service section, so that only >Tomcat-Standalone would be used, especially since I am not running >Apache. In that case, Tomcat wouldn't even start up. So then, I started >using the server-no-examples.xml.config file as the server.xml file. I >haven't touched this file, and I still get the same result. I've never >touched the web.xml, so it is using the same one. > >When Tomcat starts up, the catalina_log file looks great. But I soon as a >browser tries to go to http://localhost:8080, the HTTP 500 - Internal >Server Error shows up in the browser, and the following exception appears >in the cataline_log file. Obviously, I started looking into the valves >section of the server.xml, but again not this is an unmodified version of >the server-no-examples file, and I sure don't see anything wrong with the >valves. > >I'm wondering if I shouldn't just punt on Tomcat 4.0.1, and instead install >Tomcat 3. Is anyone using Tomcat 4 for a production system? Any thoughts >on stability of Tomcat 4 v.s. Tomcat 3? It appeared to work OK, but now I >just can't get anything to work... > >java.lang.NullPointerException > at >org.apache.catalina.valves.ErrorDispatcherValve.status(ErrorDispatcherValve.java:280) > at >org.apache.catalina.valves.ErrorDispatcherValve.invoke(ErrorDispatcherValve.java:180) > at >org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:564) > at >org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:170) > at >org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:564) > at >org.apache.catalina.valves.AccessLogValve.invoke(AccessLogValve.java:462) > at >org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:564) > at >org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:472) > at >org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:943) > at >org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:163) > at >org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:566) > at >org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:472) > at >org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:943) > at >org.apache.catalina.connector.http.HttpProcessor.process(HttpProcessor.java:1011) > at >org.apache.catalina.connector.http.HttpProcessor.run(HttpProcessor.java:1106) > at java.lang.Thread.run(Unknown Source) > >-- Jim > >At 06:38 AM 12/2/2001, Geeta Ramani wrote: >>Jim: >> >>This would probably mean that you have a typo or something in your server.xml >>when you added your new context. Make sure all the tags in server.xml are >>exactly right and then restart your server and try again.. If that doesn't >>work, >>post the contents of your server.xml and hopefully someone will spot the >>problem. >> >>Good luck! >>Geeta >> >>Jim Lindsay wrote: >> >> > Thanks. I had added the WEB-INF\classes directory myself. I did >> > eventually find that if my HelloWorldServlet class in the same place >> as the >> > HelloWorldExample servlet, it would run! This sent me on the hunt for >> some >> > other configuration file, and I have found the server.xml file. There, >> > /examples and /manager are specified as valid contexts. >> > >> > So, I added my app as a context, but somehow have managed to simply set >> > Tomcat down completely. Now, even when I just >> > try to go to http://localhost:8080, I get a HTTP 500 - Internal server >> > error; Internet Explorer error. *sigh* :) >> > >> > -- Jim >> > >> > At 09:41 PM 12/1/2001, you wrote: >> > >Jim, >> > > I don't think there is a WEB-INF directory under >>%CATALINA_HOME%/webapps/ >> > >in the default installation. I'd suggest that you put the class file in >> > >the %CATALINA_HOME%/webapps/ examples/WEB-INF/classes directory and then >> > >attempt to run the servlet by putting >> > >localhost:8080/examples/servlet/HelloWorldServlet in the address of your >> > >browser. >> > > >> > >Regards, >> > > >> > >Richard >> > >At 04:44 PM 12/1/2001 -0800, you wrote: >> > >>I have a hello world servlet, and tomcat 4.0.1. No matter where I >>put the >> > >>friggin' class, tomcat doesn't seem to be able to find it. I >> studied the >> > >>examples that come with Tomcat. >> > >> >> > >>I am simply using the index.html in >> %CATALINA_HOME%/webapps/root. There, >> > >>I have a reference to "/servlet/HelloWorldServlet". I placed this >>servlet >> > >>in %CATALINA_HOME%/webapps/WEB-INF/classes. The class is not placed >> in a >> > >>package, because I am simply trying to get anything to work. I >> still get >> > >>an error page from Tomcat as follows: >> > >>Apache Tomcat/4.0.1 - HTTP Status 404 - /servlet/HelloWorldServlet >> > >> >> > >>type Status report >> > >>message /servlet/HelloWorldServlet >> > >>description The requested resource (/servlet/HelloWorldServlet) is not >> > >>available. >> > >> >> > >>Can someone please tell me what I'm doing wrong? >> > >> >> > >>TIA. >> > >> >> > >>-- Jim >> > >> > >> ___________________________________________________________________________ >> > To unsubscribe, send email to [EMAIL PROTECTED] and include in the >> body >> > of the message "signoff SERVLET-INTEREST". >> > >> > Archives: http://archives.java.sun.com/archives/servlet-interest.html >> > Resources: http://java.sun.com/products/servlet/external-resources.html >> > LISTSERV Help: http://www.lsoft.com/manuals/user/user.html >> >>___________________________________________________________________________ >>To unsubscribe, send email to [EMAIL PROTECTED] and include in the body >>of the message "signoff SERVLET-INTEREST". >> >>Archives: http://archives.java.sun.com/archives/servlet-interest.html >>Resources: http://java.sun.com/products/servlet/external-resources.html >>LISTSERV Help: http://www.lsoft.com/manuals/user/user.html > >___________________________________________________________________________ >To unsubscribe, send email to [EMAIL PROTECTED] and include in the body >of the message "signoff SERVLET-INTEREST". > >Archives: http://archives.java.sun.com/archives/servlet-interest.html >Resources: http://java.sun.com/products/servlet/external-resources.html >LISTSERV Help: http://www.lsoft.com/manuals/user/user.html > ___________________________________________________________________________ To unsubscribe, send email to [EMAIL PROTECTED] and include in the body of the message "signoff SERVLET-INTEREST". Archives: http://archives.java.sun.com/archives/servlet-interest.html Resources: http://java.sun.com/products/servlet/external-resources.html LISTSERV Help: http://www.lsoft.com/manuals/user/user.html
