Hi,
     Use the request.sendRedirect() method. It might be helpful for u.
Pranav
----- Original Message -----
From: Matt Brown <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Wednesday, May 03, 2000 6:16 AM
Subject: passing parameters from servlet to jsp page


> I am writing a jsp page with a basic form that collects some personal
> information. When the user submits the form, my servlet checks to see that
> all the fields have been filled out. If fields are empty, I want to
> redisplay the jsp form page with a different message at the top, like "fix
> the form".
>
> I pass my parameters to the servlet which it receives, but I cannot
forward
> back to the jsp page with a parameter that tells it to display the new
> message. My servlet code looks like this:
>
> String inc= "incomplete";
> RequestDispatcher rd =
>
>
this.getServletContext().getRequestDispatcher("/rev.1.0.1/new_user.jsp?compl
> ete="+inc);
> rd.forward(request,response);
>
> My jsp page is then supposed to check the paramter "complete" to see if
the
> new message should be displayed.
>
> The jsp page is redisplayed, but the parameter is not sent and the page
> displays the original message. I have other code where this works, but for
> some reason it does not here and I am mystified.
> Any advice is appreciated,
> Matt
>
>
===========================================================================
> To unsubscribe: mailto [EMAIL PROTECTED] with body: "signoff
JSP-INTEREST".
> 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".
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

Reply via email to