Satyan:
The lines you have in your properties file look correct to me. The only thing I
can think of is maybe the use of the word "init"?? Maybe it is reserved and so
you cant use it? Try changing it to say "Init" or "AnInit" and see if you have
any luck. Sorry to say this obvious thing too, but make sure you restart JRun
after you make this change.. I assume that calling InitServlet directly works,
so you must already have added InitServlet to the classpath, right?
Good luck!
Geeta
Prakash Satyan wrote:
> Hello Geeta,
>
> Thanks a lot for the reply. But my problem is more elementary than that. As
> I have written earlier also is that I am not able to use the alias I am
> defining in the servlets.properties file. I am sending the two lines which
> define the alias for my servlet and specify the init parameters.
>
> servlet.init.code=InitServlet
> servlet.init.args=country=India,city=Delhi
>
> Now when I try to access the servlet by the name init instead of
> InitServlet then I am unable to do that.
>
> Thanks,
>
> Satyan Prakash
>
> Geeta Ramani <[EMAIL PROTECTED]> on 07/12/2000 08:55:41 PM
>
> Please respond to "A mailing list for discussion about Sun Microsystem's
> Java Servlet API Technology."
> <[EMAIL PROTECTED]>
>
> To: [EMAIL PROTECTED]
> cc: (bcc: Prakash Satyan-SWD-ITIL-UB/Itilmail)
>
> Subject: Re: Fetching Initialization parameters for a servlet in Jrun
>
> Satyan:
>
> We routinely use initialization parameters for our servlets, including
> alias names, and we use JRun, and yes, you are right, the
> servlets.properties file is the file to edit. What kind of error are you
> getting? I assume your initialization code is in the init() method?
> Maybe you can put your initialization code within a try/catch block and
> get a stacktrace so you can see excatly where your code fails... One
> thing we found is that the servlets.properties file is *very* finicky:
> any carriage returns and the initialization will not work, because the
> init parameters are not read properly. So (assuming you are working in
> an UNIX environment) make sure you are editing the proerties file using
> vi/emacs and there are no "bad" carriage return kind of characters.
>
> Good luck!
> Geeta
>
> ___________________________________________________________________________
> 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
___________________________________________________________________________
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