Return-Path: Delivered-To: apmail-jakarta-tomcat-user-archive@apache.org Received: (qmail 62518 invoked from network); 20 Jun 2003 06:43:08 -0000 Received: from exchange.sun.com (192.18.33.10) by daedalus.apache.org with SMTP; 20 Jun 2003 06:43:08 -0000 Received: (qmail 18033 invoked by uid 97); 20 Jun 2003 06:45:38 -0000 Delivered-To: qmlist-jakarta-archive-tomcat-user@nagoya.betaversion.org Received: (qmail 18026 invoked from network); 20 Jun 2003 06:45:37 -0000 Received: from daedalus.apache.org (HELO apache.org) (208.185.179.12) by nagoya.betaversion.org with SMTP; 20 Jun 2003 06:45:37 -0000 Received: (qmail 61036 invoked by uid 500); 20 Jun 2003 06:42:53 -0000 Mailing-List: contact tomcat-user-help@jakarta.apache.org; run by ezmlm Precedence: bulk List-Unsubscribe: List-Subscribe: List-Help: List-Post: List-Id: "Tomcat Users List" Reply-To: "Tomcat Users List" Delivered-To: mailing list tomcat-user@jakarta.apache.org Received: (qmail 61019 invoked from network); 20 Jun 2003 06:42:51 -0000 Received: from elephant.ru.ac.za (146.231.128.21) by daedalus.apache.org with SMTP; 20 Jun 2003 06:42:51 -0000 Received: from leet.dsl.ru.ac.za ([146.231.113.83] helo=leet) by elephant.ru.ac.za with smtp (Exim 4.20) id 19TFbv-00094B-33 for tomcat-user@jakarta.apache.org; Fri, 20 Jun 2003 08:42:59 +0200 Message-ID: <006601c336f7$30484310$5371e792@dsl.ru.ac.za> From: "Dominic Parry" To: "Tomcat Users List" References: Subject: Re: web.xml init param Date: Fri, 20 Jun 2003 08:42:59 +0200 MIME-Version: 1.0 Content-Type: multipart/alternative; boundary="----=_NextPart_000_0063_01C33707.F3BEC390" X-Priority: 3 X-MSMail-Priority: Normal X-Mailer: Microsoft Outlook Express 6.00.2800.1158 X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2800.1165 X-Spam-Score: -5.5 (-----) X-Scanner: exiscan for exim4 (http://duncanthrax.net/exiscan/) *19TFbv-00094B-33*X91DilDXyi2* X-Spam-Rating: daedalus.apache.org 1.6.2 0/1000/N X-Spam-Rating: daedalus.apache.org 1.6.2 0/1000/N ------=_NextPart_000_0063_01C33707.F3BEC390 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable My Guess is that you've Misplaced, or misspelled the ShowMessage class = somewhere. Remember that it is Case Sensitive. The other thing is that = you have packaged it so you should be calling = /conserv/servlet/TestPkg/ShowMessage Hope this helps Cheers Dom ----- Original Message -----=20 From: Jing Huang=20 To: tomcat-user@jakarta.apache.org=20 Sent: Thursday, June 19, 2003 11:04 PM Subject: RE: web.xml init param 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.=20 HTTP Status 500 -=20 = -------------------------------------------------------------------------= ------- type Exception report message=20 description The server encountered an internal error () that prevented = it from fulfilling this request. exception=20 javax.servlet.ServletException: Cannot allocate servlet instance for = path /conserv/servlet/ShowMessage at = org.apache.catalina.servlets.InvokerServlet.serveRequest(InvokerServlet.j= ava: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(Applicat= ionFilterChain.java:247) at = org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilte= rChain.java:193) at = org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve= .java:256) at = org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.in= vokeNext(StandardPipeline.java:643) at = org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:48= 0) 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.in= vokeNext(StandardPipeline.java:643) at = org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:48= 0) 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.in= vokeNext(StandardPipeline.java:643) at = org.apache.catalina.valves.ErrorDispatcherValve.invoke(ErrorDispatcherVal= ve.java:171) at = org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.in= vokeNext(StandardPipeline.java:641) at = org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:= 172) at = org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.in= vokeNext(StandardPipeline.java:641) at = org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:48= 0) at = org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:995) at = org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.j= ava:174) at = org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.in= vokeNext(StandardPipeline.java:643) at = org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:48= 0) 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.processCo= nnection(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=20 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(WebappClas= sLoader.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:66= 8) at = org.apache.catalina.servlets.InvokerServlet.serveRequest(InvokerServlet.j= ava: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(Applicat= ionFilterChain.java:247) at = org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilte= rChain.java:193) at = org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve= .java:256) at = org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.in= vokeNext(StandardPipeline.java:643) at = org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:48= 0) 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.in= vokeNext(StandardPipeline.java:643) at = org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:48= 0) 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.in= vokeNext(StandardPipeline.java:643) at = org.apache.catalina.valves.ErrorDispatcherValve.invoke(ErrorDispatcherVal= ve.java:171) at = org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.in= vokeNext(StandardPipeline.java:641) at = org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:= 172) at = org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.in= vokeNext(StandardPipeline.java:641) at = org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:48= 0) at = org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:995) at = org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.j= ava:174) at = org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.in= vokeNext(StandardPipeline.java:643) at = org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:48= 0) 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.processCo= nnection(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=20 >>> Yoav.Shapira@mpi.com 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: tomcat-user-unsubscribe@jakarta.apache.org For additional commands, e-mail: tomcat-user-help@jakarta.apache.org >>> Yoav.Shapira@mpi.com 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: tomcat-user-unsubscribe@jakarta.apache.org For additional commands, e-mail: tomcat-user-help@jakarta.apache.org ------=_NextPart_000_0063_01C33707.F3BEC390--