You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tomcat.apache.org by Jiger Java <ji...@hotmail.com> on 2002/02/09 04:23:38 UTC

Servlet Mappings Problem

Hi,
   I am having some problem fitting my requirements in web.xml. I want to
do something like this.
Whenever a user says http://server.com/contracts . It is supposed to show
him the login page. But with some extra parameters to be added.
So basically the url will become
http://server.com/anacreon/servlet/AuthenticationServlet?role=reseller

Can I do this using simple Tomcat.(We dont use apache so dont tell me to use
url rewriting stuff).
I am also not in favour of writing servlets that do this & then mapping
the url to this servlet. That is a bad solution. Cant we specify in web.xml
something like this.

<servlet>
       <servlet-name>internalauth</servlet-name>
       <servlet-class>InternalAuthenticationServlet</servlet-class>
   </servlet>

   <servlet-mapping>
           <servlet-name>internalauth?role=marketing</servlet-name>
           <url-pattern>/contracts</url-pattern>
   </servlet-mapping>

   <servlet-mapping>
           <servlet-name>internalauth?role=finance</servlet-name>
           <url-pattern>/finance</url-pattern>
   </servlet-mapping>


Specifying params in <servlet-class> also gives error.


Any idea would help.

Thanks,
Jiger





_________________________________________________________________
Join the world’s largest e-mail service with MSN Hotmail. 
http://www.hotmail.com


--
To unsubscribe:   <ma...@jakarta.apache.org>
For additional commands: <ma...@jakarta.apache.org>
Troubles with the list: <ma...@jakarta.apache.org>