You have no control over when your servlet container will call your servlets
init method. You cannot rely on get the parameter from init.

> -----Original Message-----
> From: A mailing list for discussion about Sun Microsystem's Java Servlet
> API Technology. [mailto:[EMAIL PROTECTED]]On Behalf Of
> Robert
> Sent: Tuesday, July 04, 2000 5:49 PM
> To: [EMAIL PROTECTED]
> Subject: Re: How to retrieve param, forwarded to a servlet.
>
>
> I can retrieve the value from the parameter
> in doGet() but not in init(). Anyone
> know why? And what must I do to be able
> to retrieve the value in the init() method?
>
> /Robert Karlsson
>
> On Tue, 4 Jul 2000, Robert wrote:
>
> > Hello,
> >
> > How can I retrieve the parameters in a servlet
> > that I send in a jsp:
> >
> > <jsp:forward page="someservlet">
> >  <jsp:param name="varname" value="sumvalue">
> > </jsp:forward>
> >
> > To my knowledge I'm supposed to use the request
> > object with the getParameter("varname") or
> > getParameters(). But I can't seem to get it
> > working.
> > I want to retrive the parameter in the servlets
> > init() method.
> >
> > Anyone having a solution, please?
> >
> >
> >
> > /Robert Karlsson
> >
> >
> __________________________________________________________________
> _________
> > 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

Reply via email to