tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From John Turner <tomcat-u...@johnturner.com>
Subject Re: adding a servlet to my webapp
Date Wed, 03 Sep 2003 19:20:44 GMT

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-user&m=103945394724196&w=2

John

Jason Jesso wrote:

> 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 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:  (What is wrong here??)
>>>
>>> I have a webapp defined in server.xml as
>>>
>>> =======================
>>>       <Context path="/jasonTest"
>>>            docBase="jasonTest"
>>>            debug="0"
>>>            reloadable="true"
>>>            crossContext="true">
>>>            <Logger className="org.apache.catalina.logger.FileLogger" 
>>> prefix="jasonTest" suffix=".out"/>
>>>        </Context>
>>> =======================
>>>
>>>
>>> My webapp directory structure looks like:
>>> =======================
>>> neptune:root> ls -lR jasonTest/
>>> total 16
>>> drwxr-sr-x   4 root     software        512 Sep 03 10:18 WEB-INF
>>> -rw-r--r--   1 root     software         43 Sep 03 10:10 index.html
>>> jasonTest/WEB-INF:
>>> total 24
>>> drwxr-sr-x   3 root     software        512 Sep 03 11:12 classes
>>> drwxr-sr-x   2 root     software        512 Sep 03 10:09 lib
>>> -rw-r--r--   1 root     software        328 Sep 03 14:22 web.xml
>>>
>>> jasonTest/WEB-INF/classes:
>>> total 8
>>> drwxr-sr-x   2 root     software        512 Sep 03 10:31 foo
>>>
>>> jasonTest/WEB-INF/classes/foo:
>>> total 8
>>> -rw-r-----   1 root     software        815 Sep 03 10:31 
>>> HelloWorld.class
>>>
>>> jasonTest/WEB-INF/lib:
>>> total 0
>>> neptune:root>
>>> =======================
>>>
>>> My web.xml looks like:
>>>
>>> <?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-name>HelloWorld</servlet-name>
>>>    <servlet-class>/servlet/foo/HelloWorld</servlet-class>
>>> </servlet>
>>>
>>> </web-app>
>>>
>>>
>>
>>
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: tomcat-user-unsubscribe@jakarta.apache.org
>> For additional commands, e-mail: tomcat-user-help@jakarta.apache.org
>>
>>
> 



Mime
View raw message