On Tue, 4 Jul 2000, Robert wrote:
> 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?
I don't believe you can get a parameter in init() (we're talking about
request parameters here, not init parameters). init() doesn't have a
request object available, as doGet()/doPost() do. And it needs to be
that way because it's possible for init() to be called outside the
context of a request.
> 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
Milt Epstein
Research Programmer
Software/Systems Development Group
Computing and Communications Services Office (CCSO)
University of Illinois at Urbana-Champaign (UIUC)
[EMAIL PROTECTED]
___________________________________________________________________________
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