tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Rum Pel" <rum_...@hotmail.com>
Subject Re: web.xml default parameters to a servlet
Date Tue, 06 Aug 2002 04:32:39 GMT

>To my generic servlet I want to attach two URLs, but I dont want
>to distinguish the two calls using the URLs. Instead I want tomcat
>to pass a default parameter to the servlet based on the URL.
>Is this possible, if yes what do I need to write in the web.xml?
>

I tried using init-param tag, but my servlet did not get this
parameter.

  <servlet>
        <servlet-name>userdel</servlet-name>
        <servlet-class>my.UserUtils</servlet-class>
	<init-param>
		<param-name>function</param-name>
		<param-value>delete</param-value>
	</init-param>
    </servlet>

  <servlet>
        <servlet-name>useradd</servlet-name>
        <servlet-class>my.UserUtils</servlet-class>
	<init-param>
		<param-name>function</param-name>
		<param-value>add</param-value>
	</init-param>
    </servlet>

In my servlet, I dont have the paramter function, its value it null.


_________________________________________________________________
Send and receive Hotmail on your mobile device: http://mobile.msn.com


--
To unsubscribe, e-mail:   <mailto:tomcat-user-unsubscribe@jakarta.apache.org>
For additional commands, e-mail: <mailto:tomcat-user-help@jakarta.apache.org>


Mime
View raw message