tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Jim Cheesman <jch...@msl.es>
Subject Re: accessing servlets directly
Date Fri, 15 Jun 2001 11:20:59 GMT
At 01:14 PM 15/06/01, you wrote:
>Hi people,
>
>Now, when I want to access a servlet, I have to point to
>http://www.myserver.com/servlets/servlet/<actual servlet>. Is it
>possible to mount the servlets directly to
>http://www.myserver.com/servlets/<actual servlet>? How can I do this?


And a servlet-mapping entry in the webapp web.xml file:
(For example)
<servlet>
   <servlet-name>
     GenerateJspServlet
   </servlet-name>
   <servlet-class>
     sinfo.jsp.utils.GenerateJspServlet
   </servlet-class>
</servlet>

<servlet-mapping>
   <servlet-name>
     GenerateJspServlet
   </servlet-name>
   <url-pattern>
     /GenerateJspServlet
   </url-pattern>
</servlet-mapping>

Change the url-pattern if you want - that's what you'll be typing 
in/linking to.

HTH,
JimC




--

                           *   Jim Cheesman   *
             Trabajo: 
jchees@msl.es - (34)(91) 724 9200 x 2360
                           Evil is 
not all bad.



Mime
View raw message