When I go to my servlet I get HTTP Status 404 -
/jasonTest/servlet/foo/HelloWorld
The url is:
http://neptune/jasonTest/servlet/foo/HelloWorld
My config is as follows: (What is wrong here??)
I have a webapp defined in server.xml as
===
Context path=/jasonTest
You have to map your servlet in web.xml.
FAQ: http://jakarta.apache.org/tomcat/faq/misc.html#invoker
John
Jason Jesso wrote:
When I go to my servlet I get HTTP Status 404 -
/jasonTest/servlet/foo/HelloWorld
The url is:
http://neptune/jasonTest/servlet/foo/HelloWorld
My config is as follows:
But, I don't want to use the invoker. I want to be able to specify
the servlet itself in web.xml.
The invoker is evil according to the link you gave me.
John Turner wrote:
You have to map your servlet in web.xml.
FAQ: http://jakarta.apache.org/tomcat/faq/misc.html#invoker
John
Jason
Yes, exactly.
The way you have it now is trying to use the Invoker servlet.
You are missing the servlet mapping in web.xml, as explained in option
#3 of this post which is linked from the FAQ section:
http://marc.theaimsgroup.com/?l=tomcat-userm=103945394724196w=2
John
Jason Jesso wrote:
Jason,
John was pointing out that you're missing the servlet-mapping which
basically says, For a URL that looks like X, send the request to servlet
Y. You've also got a malformed servlet-class value. Something like
this should work...
servlet
servlet-nameHelloWorld/servlet-name
My guess is that this is right then:
?xml version=1.0 encoding=ISO-8859-1?
!DOCTYPE web-app
PUBLIC -//Sun Microsystems, Inc.//DTD Web Application 2.3//EN
http://java.sun.com/dtd/web-app_2_3.dtd;
web-app
servlet
servlet-nameHelloWorld/servlet-name
emotionalize.conceptualize.visualize.realize
Tel: +27125468436
Fax: +27125468436
email:[EMAIL PROTECTED]
web: www.volume4.co.za
:: -Original Message-
:: From: Jason Jesso [mailto:[EMAIL PROTECTED]
:: Sent: Wednesday, September 03, 2003 9:36 PM
:: To: Tomcat Users List
:: Subject: Re: adding a servlet to my webapp
::
:: My guess
At 12:36 PM 9/3/2003, you wrote:
My guess is that this is right then:
servlet
servlet-nameHelloWorld/servlet-name
servlet-classHelloWorld/servlet-class
/servlet
servlet-mapping
servlet-nameHelloWorld/servlet-name
url-pattern/servlet/foo/HelloWorld/url-pattern
url-pattern*/Form/url-pattern
/servlet-mapping
/web-app
-Original Message-
From: Schalk [mailto:[EMAIL PROTECTED]
Sent: Wednesday, September 03, 2003 2:46 PM
To: 'Tomcat Users List'
Subject: RE: adding a servlet to my webapp
Jason
servlet
servlet-nameHelloWorld/servlet
Given your initial post your class HelloWorld was in
jasonTest/WEB-INF/classes/foo
So either HelloWorld must be in a package foo. ie the first code line of
the Helloworld source is:
package foo;
or you need to put HelloWorld.class in
jasonTest/WEB-INF/classes
Perfect. That works.
Thanks
Jon Wingfield wrote:
Given your initial post your class HelloWorld was in
jasonTest/WEB-INF/classes/foo
So either HelloWorld must be in a package foo. ie the first code line
of the Helloworld source is:
package foo;
or you need to put HelloWorld.class in
email:[EMAIL PROTECTED]
web: www.volume4.co.za
:: -Original Message-
:: From: Jason Jesso [mailto:[EMAIL PROTECTED]
:: Sent: Wednesday, September 03, 2003 10:04 PM
:: To: Tomcat Users List
:: Subject: Re: adding a servlet to my webapp
::
:: Perfect. That works.
::
:: Thanks
::
:: Jon
12 matches
Mail list logo