Return-Path: Delivered-To: apmail-jakarta-tomcat-user-archive@apache.org Received: (qmail 8366 invoked from network); 23 Sep 2002 02:45:02 -0000 Received: from unknown (HELO nagoya.betaversion.org) (192.18.49.131) by daedalus.apache.org with SMTP; 23 Sep 2002 02:45:02 -0000 Received: (qmail 22065 invoked by uid 97); 23 Sep 2002 02:45:08 -0000 Delivered-To: qmlist-jakarta-archive-tomcat-user@jakarta.apache.org Received: (qmail 22003 invoked by uid 97); 23 Sep 2002 02:45:07 -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 21991 invoked by uid 98); 23 Sep 2002 02:45:06 -0000 X-Antivirus: nagoya (v4218 created Aug 14 2002) Message-Id: <5.1.0.14.2.20020922214032.02f95310@shell.visi.com> X-Sender: hoju@shell.visi.com X-Mailer: QUALCOMM Windows Eudora Version 5.1 Date: Sun, 22 Sep 2002 21:49:57 -0500 To: "Tomcat Users List" From: Jacob Kjome Subject: Re: JSP working but Servlets not working In-Reply-To: Mime-Version: 1.0 Content-Type: multipart/alternative; boundary="=====================_350438083==_.ALT" X-Spam-Rating: daedalus.apache.org 1.6.2 0/1000/N X-Spam-Rating: daedalus.apache.org 1.6.2 0/1000/N --=====================_350438083==_.ALT Content-Type: text/plain; charset="us-ascii"; format=flowed Notice your form action:
You prefixed it with a "/" meaning that it looks for your servlet from the root of the web. Since your context is not the root of the web, the message you got is exactly what I would expect. To be correct, here is what you would do: Further, that will still not work because you have only defined your servlet in the web.xml. You have not yet provided a mapping for it. For defined servlets without mappings, Tomcat provides a default servlet invoker at the path /yourcontext/servlet/*. So, to make this really work, you would use: Also, you don't necessarily need to have the be the same as the . I would provide a simpler name such as: hello HelloWorldExample Now, you can actually access your servlet in two ways. The one above or: Better yet, provide a servlet-mapping such as: hello /hi Now you can access it via: This is all pretty basic stuff. You should take a look at a book like Jason Hunter's Java Servlet Programming, Second Edition. It will provide you with all you need to get a base understanding of servlets. Then you can concentrate on the really tough questions. Hope that helped. Jake At 06:53 PM 9/22/2002 +0000, you wrote: >Hi Experts, > >Greetings! > >I am using Apache 1.3.26 + (Jboss 3.0.3, Tomcat 4.0.4 bundle) >I treid to creat a small Web Application. My JSP files are WORKING >properly BUT when Servlet is called (from JSP Page), >I get "No Context COnfigured Error" > >My Directory structure is as follows: >/kithany (root) >/kithany/register.htm >/kithany/WEB-INF/web.xml >/kithany/WEB-INF/classes/HelloWorldExample.java >/kithany/WEB-INF/classes/HelloWorldExample.class >/kithany/META-INF/application.xml > > >I have my APPLICATION.XML file as follows: >------------------------------------------------------------------------- > > >KITHANY > > >kithany.war >/kithany > > > >------------------------------------------------------------------------- > >And, my WEB.XML file is as: >------------------------------------------------------------------------- > >PUBLIC "-//Sun Microsystems, Inc.//DTD Web Application 2.3//EN" >"http://java.sun.com/dtd/web-app_2_3.dtd"> > > > HelloWorldExample > HelloWorldExample > > > > index.jsp > > > >------------------------------------------------------------------------- > >My JSP file "register.jsp" is shown below. This file calls a SERVLET >HelloWorldExample.class when user clicks. >------------------------------------------------------------------------- > > > >...rest of the file is not shown..... > >------------------------------------------------------------------------- > > >I then create WAR file as follows: >------------------------------------------------------------------------- >#pwd >#/kithany >#jar -cvfM kithany.war . >------------------------------------------------------------------------- > >Which I then, put it into /jboss/server/default/deploy and then start my >JBOSS(Tomcat/Catalina) Server and then on browser, I type following: >http://MY_IP_ADDR_ESS:8080/kithany/register.html which displays the file >correctly. When the user clicks SUBMIT, the file should call >HelloWorldExample.class file BUT it displays Error like: > >"Apache Tomcat/4.0.3 - HTTP Status 500 - No Context configured to process >this request" > >Experts, could you please guide me on to this. > >THANKS! > >Manoj G. Kithany >manojkithany108@hotmail.com > > > >_________________________________________________________________ >Send and receive Hotmail on your mobile device: http://mobile.msn.com > > >-- >To unsubscribe, e-mail: >For additional commands, e-mail: --=====================_350438083==_.ALT--