Sandy Tiu wrote:

> I did this inside my JSP :
>
> <%
> response.sendRedirect(update_error.jsp?msg=errormsg);
> %>
>
> and I'm getting this error:
>
> HTTP Error 400
> 400 Bad Request
>
> Due to malformed syntax, the request could not be understood by the server.
> The client should not repeat the request without modifications.
>
> is there a way to redirect and pass parameters at the same time ?
>
> Sandy
>
> ______________________________________________________
> Get Your Private, Free Email at http://www.hotmail.com
>
> ===========================================================================
> 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

Hi,

 I tried out this program and its working. U'll have to give the parameter to
sendRedirect as a string which gives the URL of the  jsp file and the paremeter u
want to pass.

Redirect.jsp

<html>
<body>
<%! String str="http://localhost:8080/getName.jsp?name=hh"; %>    ###NOTE THIS
<% response.sendRedirect(str); %>
</body>
</html


getName.jsp

<html>
</body>
<%= request.getParameter("name") %>
</body>
</html


output:  hh

Dheepa

===========================================================================
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