If your servlet engines supports the current servlet specs you can also get
a request dispatcher, put your value in the request, and forward to the JSP.
This has the advantage that:
* saves a roundtrip back to the client browser
* allows you to put anything (any object) in the request, not just string
parameters
--
Tinou Bao
www.tinou.com
----- Original Message -----
From: "Chen, Jason" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Monday, July 09, 2001 5:43 PM
Subject: Re: [JSP-INTEREST] simple servlet
> in servlet1, do a response.redirect("servlet2?param1=" + value1);
>
> -----Original Message-----
> From: Eric Cho [mailto:[EMAIL PROTECTED]]
> Sent: Monday, July 09, 2001 5:35 PM
> To: [EMAIL PROTECTED]
> Subject: simple servlet
>
>
> Hi,
>
> I have a JSP which has a form that submits a value (ex. value1).
> I'd like to send it to a servlet that in turn takes that value and punches
> out another jsp page of value1.
>
> ex. In jspPage1 --- onclick of button1 with value of value1 goes to
> servlet1.
> I'd like servlet1 to call on jspPage2 of uri = value1.
>
> How would i go about doing that?
>
> Thanks,
> Eric
>
> _______________________________________________________
> eSafe Protect Gateway has scanned this mail for viruses, vandals and
> suspicious attachments.
>
>
===========================================================================
> To unsubscribe: mailto [EMAIL PROTECTED] with body: "signoff
> JSP-INTEREST".
> For digest: mailto [EMAIL PROTECTED] with body: "set JSP-INTEREST
> DIGEST".
> Some relevant FAQs on JSP/Servlets can be found at:
>
> http://java.sun.com/products/jsp/faq.html
> http://www.esperanto.org.nz/jsp/jspfaq.html
> http://www.jguru.com/jguru/faq/faqpage.jsp?name=JSP
> http://www.jguru.com/jguru/faq/faqpage.jsp?name=Servlets
>
>
===========================================================================
> To unsubscribe: mailto [EMAIL PROTECTED] with body: "signoff
JSP-INTEREST".
> For digest: mailto [EMAIL PROTECTED] with body: "set JSP-INTEREST
DIGEST".
> Some relevant FAQs on JSP/Servlets can be found at:
>
> http://java.sun.com/products/jsp/faq.html
> http://www.esperanto.org.nz/jsp/jspfaq.html
> http://www.jguru.com/jguru/faq/faqpage.jsp?name=JSP
> http://www.jguru.com/jguru/faq/faqpage.jsp?name=Servlets
>
===========================================================================
To unsubscribe: mailto [EMAIL PROTECTED] with body: "signoff JSP-INTEREST".
For digest: mailto [EMAIL PROTECTED] with body: "set JSP-INTEREST DIGEST".
Some relevant FAQs on JSP/Servlets can be found at:
http://java.sun.com/products/jsp/faq.html
http://www.esperanto.org.nz/jsp/jspfaq.html
http://www.jguru.com/jguru/faq/faqpage.jsp?name=JSP
http://www.jguru.com/jguru/faq/faqpage.jsp?name=Servlets