Dont forget:

<!-- The mapping for the JSP servlet -->

<servlet-mapping>

<servlet-name>jsp</servlet-name>

<url-pattern>*.jsp</url-pattern>

</servlet-mapping>

Best Regards,

-Martin

 

>From: Hans Bergsten <[EMAIL PROTECTED]>
>Reply-To: A mailing list about Java Server Pages specification and reference <[EMAIL PROTECTED]>
>To: [EMAIL PROTECTED]
>Subject: Re: JSP working but Servlets not working
>Date: Sun, 22 Sep 2002 12:26:52 -0700
>MIME-Version: 1.0
>Received: from mc2-f31.law16.hotmail.com ([65.54.237.38]) by hotmail.com with Microsoft SMTPSVC(5.0.2195.5600); Sun, 22 Sep 2002 12:37:11 -0700
>Received: from swjscmail2.java.sun.com ([192.18.99.108]) by mc2-f31.law16.hotmail.com with Microsoft SMTPSVC(5.0.2195.5600); Sun, 22 Sep 2002 12:27:43 -0700
>Received: from swjscmail1 (swjscmail1.Sun.COM [192.18.99.107])by swjscmail2.java.sun.com (Postfix) with ESMTPid 5B03621976; Sun, 22 Sep 2002 13:24:38 -0600 (MDT)
>Received: from JAVA.SUN.COM by JAVA.SUN.COM (LISTSERV-TCP/IP release 1.8d) with spool id 2942415 for [EMAIL PROTECTED]; Sun, 22 Sep 2002 13:22:40 -0600
>Received: from s1.servlets.net (s1.servlets.net [209.221.135.4]) by swjscmail1.java.sun.com (Postfix) with ESMTP id B3F014814 for <[EMAIL PROTECTED]>; Sun, 22 Sep 2002 13:22:39 -0600 (MDT)
>Received: from gefionsoftware.com (lsanca1-ar6-4-62-203-052.lsanca1.elnk.dsl.genuity.net [4.62.203.52]) by s1.servlets.net (8.11.6/8.9.3) with ESMTP id g8MJR4B27799 for <[EMAIL PROTECTED]>; Sun, 22 Sep 2002 12:27:04 -0700
>Delivered-To: [EMAIL PROTECTED]
>User-Agent: Mozilla/5.0 (Windows; U; Win 9x 4.90; en-US; rv:1.1) Gecko/20020826
>X-Accept-Language: en-us, sv
>References: <[EMAIL PROTECTED]>
>Message-ID: <[EMAIL PROTECTED]>
>Sender: A mailing list about Java Server Pages specification and reference <[EMAIL PROTECTED]>
>Return-Path: [EMAIL PROTECTED]
>X-OriginalArrivalTime: 22 Sep 2002 19:27:43.0289 (UTC) FILETIME=[1F6BFA90:01C2626E]
>
>Manoj Kithany 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
>>
>
>You need to add a mapping to the servlet as well:
>
>
> HelloWorldExample
> /HelloWorldExample/*
>
>
>>
>>
>> index.jsp
>>
>>
>>
>>-------------------------------------------------------------------------
>>
>>My JSP file "register.jsp" is shown below. This file calls a
>>SERVLET
>>HelloWorldExample.class when user clicks.
>>-------------------------------------------------------------------------
>>
>>
>>
>>
>
>Here's the main problem: you're using an absolute path (starting
>with a
>slash) for the servlet, so when you submit the form, it's submitted
>to "/HelloWorldExample" but it should be
>"/kithany/HelloWorldExample".
>
>Change to a relative path instead (i.e., remove the leading slash):
>
>
>
>>[...]
>>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"
>
>Yes, because the path you use points to the root context, not your
>context (see above).
>
>Hans
>--
>Hans Bergsten [EMAIL PROTECTED]
>Gefion Software http://www.gefionsoftware.com
>JavaServer Pages http://TheJSPBook.com
>
>===========================================================================
>To unsubscribe: mailto [EMAIL PROTECTED] with body: "signoff
>JSP-INTEREST".
>For digest: mailto [EMAIL PROTECTED] with body: "set
>JSP-INTEREST DIGEST".
>Some relevant FAQs on JSP/Servlets can be found at:
>
>http://archives.java.sun.com/jsp-interest.html
>http://java.sun.com/products/jsp/faq.html
>http://www.esperanto.org.nz/jsp/jspfaq.jsp
>http://www.jguru.com/faq/index.jsp
>http://www.jspinsider.com


Chat with friends online, try MSN Messenger: Click Here
=========================================================================== To unsubscribe: mailto [EMAIL PROTECTED] with body: "signoff JSP-INTEREST". For digest: mailto [EMAIL PROTECTED] with body: "set JSP-INTEREST DIGEST". Some relevant FAQs on JSP/Servlets can be found at: http://archives.java.sun.com/jsp-interest.html http://java.sun.com/products/jsp/faq.html http://www.esperanto.org.nz/jsp/jspfaq.jsp http://www.jguru.com/faq/index.jsp http://www.jspinsider.com

Reply via email to