Another way could be putting this value into the session, like
this:
        HttpSession session = request.getSession(true);
        session.putValue( "param1", "abc" );

        And then, in the other Servlet, you would get it by:

        HttpSession session = request.getSession(true);
        String parameterReceived = (String)session.getValue("param1");

        You should use this if your parameter is secret, like a code or
anything like that...

        Hope i could help, best regards...

                                Guilherme Birckan
                                Computer Science student in the
                                Federal University of Santa Catarina
                                Florianopolis - SC - BRAZIL


On Wed, 22 Sep 1999, Chris Gow wrote:

> Well, the link would look like this:
>
> <A
> HREF="/geccd/servlet/fsleads.leadDetail?parameter1Name=parameter1Value&param
> eter2Name=parameter2Value...and so on">The link text</A>
>
> Of course you would have to encode the URL first to make sure your parameter
> values do not have any special characters in it (?, &, %)
>
> Chris Gow.
>
> [EMAIL PROTECTED]
>
> > -----Original Message-----
> > From: Meng, Dong J (CAP, CDI) [SMTP:[EMAIL PROTECTED]]
> > Sent: Wednesday, September 22, 1999 11:33 AM
> > To:   [EMAIL PROTECTED]
> > Subject:      How to pass value from one servlet to another servlet in the
> > link
> >
> > Hi.
> >
> > I have a servlet to present information from tables. One column link to
> > another servlet. When you click this column, it call another servlet, at
> > the
> > same time, it passes the value of this column to the servlet. Suppose the
> > value is abc. How can I put abc into the link <A HREF =
> > \"/geccd/servlet/fsleads.leadDetail\">, and how the anther servlet will
> > get
> > the value abc?
> >
> > Thanks.
> >
> > DJ
> >
> > __________________________________________________________________________
> > _
> > 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