Alberto wrote:
> 
> Hi everyone.
> I've a question:
> in my web.xml I have a lot of servlets that use the same set of parameters
> (same param name, same param value). The value of these parameters could
> change a lot of time in a month so:
> there's a way to write only one set of param name / param value and call it
> in all my servlet?
> 

Sure - create all of those name/value pairs in a properties file
and have web.xml point to it.
In your init method use a java.util.Properties object to read
the properties file and recover the parameters that servlet needs.

I do this all the time, makes it easy to synchronize all servlets
with the same properties.

-- 
WBB - [EMAIL PROTECTED]
Java Cert mock exams http://www.lanw.com/java/javacert/
Author of Java Developer's Guide to Servlets and JSP 
ISBN 0-7821-2809-2

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, email: [EMAIL PROTECTED]

Reply via email to