tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Randy Layman <randy.lay...@aswethink.com>
Subject RE: Servlet Placement and URLs to Run...
Date Thu, 19 Apr 2001 11:54:44 GMT

	How about http://10.44.82.2:8080/run/pb?  When you specify the
servlet-mapping you are telling Tomcat what URL in the webapp to handle -
/pb means "Any Request for pb in the root of my webapp".  The
/servlet/className convention is a holdover from how the older containers
used to do things and is no longer part of the spec.

	Randy

> -----Original Message-----
> From: Jim Willeke [mailto:jim@willeke.com]
> Sent: Thursday, April 19, 2001 8:09 AM
> To: tomcat-user@jakarta.apache.org
> Subject: Servlet Placement and URLs to Run...
> 
> 
> I have a servlet that I have used in other enviroments without issues.
> I am trying to get it to run under Tomcat and seem to have several 
> roadblocks.
> The Examples work and I do have a servlet SnoopServlet that works in 
> this same container.
> (http://10.44.82.2:8080/run/servlet/SnoopServlet) So, I am 
> assuming the 
> plumbing works and it is a problem with me not knowing where 
> to put this 
> or call that.
> 
> Ther servlet is in \tomcat\webapps\run\WEB-INF\classes
> \tomcat\ is tomcathome
> the actual class file is in:
> \tomcat\webapps\run\WEB-INF\classes\com\willeke\servlet\phoneb
> ook\Phonebook.class
> The servlet being in the package com.willeke.servlet.phonebook
> This runs and works fine in Jbuilder (Which uses tomcat internally)
> 
> The issues I need to resolve:
> 1. What is the right URL to call to load this servlet?
> 
> 
> 2. In the \tomcat\webapps\run\WEB-INF\web.xml I have:
>    <servlet>
>      <servlet-name>
>          Pb
>      </servlet-name>
>      <servlet-class>
>          com.willeke.servlet.phonebook.Phonebook
>      </servlet-class>
>    </servlet>
> 
>    <servlet-mapping>
>        <servlet-name>
>            Pb
>        </servlet-name>
>        <url-pattern>
>            /pb
>        </url-pattern>
>    </servlet-mapping>
> None of the following seem to work:
> http://10.44.82.2:8080/run/servlet/com/willeke/servlet/phonebo
ok/Phonebook
http://10.44.82.2:8080/run/servlet/com.willeke.servlet.phonebook.Phonebook
http://10.44.82.2:8080/run/servlet/Pb
http://10.44.82.2:8080/run/servlet/pb

Any help would be appreciated.
-jim



Mime
View raw message