Hi, Yoav You are the man! Thank you very much. Your email helps a lot. I checked the log. It seems that the host was loaded fine when tartup. My servlet works fine in the tomcat examples directory which was installed by default. However, it does not work in my development directory. Here is the runtime exception. Hopefully it makes sense to you.
HTTP Status 500 - -------------------------------------------------------------------------------- type Exception report message description The server encountered an internal error () that prevented it from fulfilling this request. exception javax.servlet.ServletException: Cannot allocate servlet instance for path /conserv/servlet/ShowMessage at org.apache.catalina.servlets.InvokerServlet.serveRequest(InvokerServlet.java:435) at org.apache.catalina.servlets.InvokerServlet.doGet(InvokerServlet.java:180) at javax.servlet.http.HttpServlet.service(HttpServlet.java:740) at javax.servlet.http.HttpServlet.service(HttpServlet.java:853) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:247) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:193) at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:256) at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:643) at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:480) at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:995) at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:191) at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:643) at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:480) at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:995) at org.apache.catalina.core.StandardContext.invoke(StandardContext.java:2415) at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:180) at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:643) at org.apache.catalina.valves.ErrorDispatcherValve.invoke(ErrorDispatcherValve.java:171) at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:641) at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:172) at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:641) at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:480) at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:995) at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:174) at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:643) at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:480) at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:995) at org.apache.coyote.tomcat4.CoyoteAdapter.service(CoyoteAdapter.java:223) at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:594) at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.processConnection(Http11Protocol.java:392) at org.apache.tomcat.util.net.TcpWorkerThread.runIt(PoolTcpEndpoint.java:565) at org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.java:619) at java.lang.Thread.run(Thread.java:539) root cause java.lang.NoClassDefFoundError: TestPkg/ShowMessage (wrong name: ShowMessage) at java.lang.ClassLoader.defineClass0(Native Method) at java.lang.ClassLoader.defineClass(ClassLoader.java:512) at java.security.SecureClassLoader.defineClass(SecureClassLoader.java:126) at org.apache.catalina.loader.WebappClassLoader.findClassInternal(WebappClassLoader.java:1679) at org.apache.catalina.loader.WebappClassLoader.findClass(WebappClassLoader.java:968) at org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1409) at org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1289) at org.apache.catalina.core.StandardWrapper.loadServlet(StandardWrapper.java:885) at org.apache.catalina.core.StandardWrapper.allocate(StandardWrapper.java:668) at org.apache.catalina.servlets.InvokerServlet.serveRequest(InvokerServlet.java:416) at org.apache.catalina.servlets.InvokerServlet.doGet(InvokerServlet.java:180) at javax.servlet.http.HttpServlet.service(HttpServlet.java:740) at javax.servlet.http.HttpServlet.service(HttpServlet.java:853) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:247) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:193) at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:256) at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:643) at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:480) at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:995) at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:191) at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:643) at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:480) at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:995) at org.apache.catalina.core.StandardContext.invoke(StandardContext.java:2415) at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:180) at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:643) at org.apache.catalina.valves.ErrorDispatcherValve.invoke(ErrorDispatcherValve.java:171) at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:641) at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:172) at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:641) at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:480) at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:995) at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:174) at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:643) at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:480) at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:995) at org.apache.coyote.tomcat4.CoyoteAdapter.service(CoyoteAdapter.java:223) at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:594) at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.processConnection(Http11Protocol.java:392) at org.apache.tomcat.util.net.TcpWorkerThread.runIt(PoolTcpEndpoint.java:565) at org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.java:619) at java.lang.Thread.run(Thread.java:539) -------------------------------------------------------------------------------- Apache Tomcat/4.1.24 >>> [EMAIL PROTECTED] 06/19/03 02:53PM >>> Howdy, >If you are invoking your servlet through /servlet it will not pick up >the init-params from web.xml. Umm, no ;) If the invoker servlet is enabled then the init-param behavior is the same whether you use a servlet mapping or the invoker servlet. >> Hi, I am new to Tomcat. This might be a very simple question >> to the gurus here. Please help. I set initial parameters for >> a servlet in web.xml. When I start the server and run the >> servlet, the servlet can not get the initial parameters. It >> seems that the web.xml was not accessed at all. Can you help? Chances are your web.xml is malformed and you have some errors in the tomcat logs. What do the tomcat logs say? >> By the way, is there a place that documents how to configure >> the web.xml and server.xml for different purposes? Yes. For web.xml, the document is called The Servlet Specification, and you want version 2.3. For server.xml, look here: http://jakarta.apache.org/tomcat/tomcat-4.1-doc/config/index.html Yoav Shapira This e-mail, including any attachments, is a confidential business communication, and may contain information that is confidential, proprietary and/or privileged. This e-mail is intended only for the individual(s) to whom it is addressed, and may not be saved, copied, printed, disclosed or used by anyone else. If you are not the(an) intended recipient, please immediately delete this e-mail from your computer system and notify the sender. Thank you. --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] >>> [EMAIL PROTECTED] 06/19/03 02:53PM >>> Howdy, >If you are invoking your servlet through /servlet it will not pick up >the init-params from web.xml. Umm, no ;) If the invoker servlet is enabled then the init-param behavior is the same whether you use a servlet mapping or the invoker servlet. >> Hi, I am new to Tomcat. This might be a very simple question >> to the gurus here. Please help. I set initial parameters for >> a servlet in web.xml. When I start the server and run the >> servlet, the servlet can not get the initial parameters. It >> seems that the web.xml was not accessed at all. Can you help? Chances are your web.xml is malformed and you have some errors in the tomcat logs. What do the tomcat logs say? >> By the way, is there a place that documents how to configure >> the web.xml and server.xml for different purposes? Yes. For web.xml, the document is called The Servlet Specification, and you want version 2.3. For server.xml, look here: http://jakarta.apache.org/tomcat/tomcat-4.1-doc/config/index.html Yoav Shapira This e-mail, including any attachments, is a confidential business communication, and may contain information that is confidential, proprietary and/or privileged. This e-mail is intended only for the individual(s) to whom it is addressed, and may not be saved, copied, printed, disclosed or used by anyone else. If you are not the(an) intended recipient, please immediately delete this e-mail from your computer system and notify the sender. Thank you. --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
