Chary,

When you do a sendRedirect, you are essentially asking the users browse to
perform an
HTTP GET from the new URL that you have provided.  If you wish to pass
information to
that URL, therefore, you must use a means permitted by the GET method - a
query string.
You can add a query string with matched parameter/value pairs to the URL to
which you
are redirecting.  As with any other GET, these parameters will be available
to the
resource at the location designated by the URL.

Example:


response.sendRedirect("http://www.myserver.com/jsp/DisplayData.jsp?d1=value1
&d2=value2...");

-AMT

> -----Original Message-----
> From: A mailing list about Java Server Pages specification and reference
> [mailto:[EMAIL PROTECTED]]On Behalf Of
> [EMAIL PROTECTED]
> Sent: Tuesday, January 18, 2000 6:50 AM
> To: [EMAIL PROTECTED]
> Subject: regs servlet calling Jsp...
>
>
> Hi all,
>   Can anyone help me how to call a JSP from a servlet.
>
> 1.)  I've tried with "callPage" but I'm getting  ClassCastException at
> this step:
>
>         ((com.sun.server.http.HttpServiceResponse)
> res).callPage("/DisplayData.jsp", req);
>
>
> 2.) I can call a JSP page with sendRedirect but I can't send the
> information from servlet to this page.
>         Is it possible to send info from servlet thru
> sendRedirect. If so,pl
> let me know.
>
> Help me out.
>
> Thanks in advance,
> Chary
>
> ==================================================================
> =========
> To unsubscribe: mailto [EMAIL PROTECTED] with body: "signoff
> JSP-INTEREST".
> FAQs on JSP can be found at:
>  http://java.sun.com/products/jsp/faq.html
>  http://www.esperanto.org.nz/jsp/jspfaq.html
>

===========================================================================
To unsubscribe: mailto [EMAIL PROTECTED] with body: "signoff JSP-INTEREST".
FAQs on JSP can be found at:
 http://java.sun.com/products/jsp/faq.html
 http://www.esperanto.org.nz/jsp/jspfaq.html

Reply via email to