In JRUN for example you add this to servlets.properties file (syntax may be
different in other engines):

servlet.CrossroadsConsole.code=com.instinet.crossroads.console.CrossroadsConsoleServlet

servlet.CrossroadsConsole.args=propertiesFile=c:/java/classes/com/instinet/crossroads/console/console.properties

servlet.CrossroadsConsole.preload=false

Then in servlet you read it in:

String PROPERTIES_FILE = sConfig.getInitParameter("propertiesFile");

Then you can load the properties into java.util.Properties object.

TO ALL:

Is there an easier way to give servlet some environment specific information other
than providing properties file?  Currently I use the java.util.Properties class to
read in the properties file.  This works pretty well but I'm just wondering if
there is an easier way (this is pretty easy but it wouldn't hurt to simplify it
even more)?

dave.


WALLY URRUTIA wrote:

>   Hi,
>
>   I need to pass the same port and address info to different servlets, how can
> i do that?
>   I think i can pass this arguments throught the servlet.properties file but
> im not sure. If true, how i can make it work.
>
>  thanks in advance, bye.
>
>    Bas..
>
> ____________________________________________________________________
> Get free email and a permanent address at http://www.netaddress.com/?N=1
>
> ___________________________________________________________________________
> To unsubscribe, send email to [EMAIL PROTECTED] and include in the body
> of the message "signoff SERVLET-INTEREST".
>
> Archives: http://archives.java.sun.com/archives/servlet-interest.html
> Resources: http://java.sun.com/products/servlet/external-resources.html
> LISTSERV Help: http://www.lsoft.com/manuals/user/user.html

--
David Mossakowski        [EMAIL PROTECTED]
http://www.dwdog.com/styk      212.310.7275

"I don't sit idly by, I'm planning a big surprise"
F         U         G         A        Z        I

___________________________________________________________________________
To unsubscribe, send email to [EMAIL PROTECTED] and include in the body
of the message "signoff SERVLET-INTEREST".

Archives: http://archives.java.sun.com/archives/servlet-interest.html
Resources: http://java.sun.com/products/servlet/external-resources.html
LISTSERV Help: http://www.lsoft.com/manuals/user/user.html

Reply via email to