Generally your servlet engine should allow you to define init parameters.

I have included the steps required to set up init parameters with Jrun with
an plugin to IIS4.0

1. Launch the JRun admin
2. Select Service Config for jse ( JRun Servlet Engine for JCP )
3. Select the Aliases tab
4. Choose Add
5. Enter the alias name and class name. Double click on the  init
arguements cell
6 Choose Add and add your init arguements (eg. name=addressfile
value=x:\yourfilepath\yourfile)
7. Choose Save from each dialog
8. Close
9 You may have to restart Jrun ( and maybe your machine)
10 Access your servlet by the alias name and you should be able to get the
init arguements you set up!

Sanjiv





Mahesh Acharya <[EMAIL PROTECTED]> on 03/09/2000 02:54:51 PM

Please respond to "A mailing list for discussion about Sun Microsystem's
      Java              Servlet API Technology."
      <[EMAIL PROTECTED]>

To:   [EMAIL PROTECTED]
cc:    (bcc: Sanjiv Sahayam/Technology Providers/lk)
Subject:  help




Hi,
How can we set init parameter in the web server configuration ?
Basically, I want to get the values something like this, in the init
method of the servlet
String filename ;
public void init(ServletConfig config) throws ServletException
{
     super.init(config);
     filename = config.getInitParameter("addressfile");
.......
}
___________________________________________________________________________
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

___________________________________________________________________________
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