How I can redirect a page using post method?
Hi all,
Ive a form which send some data by post method to a jsp page. After that, I do some management and then I d like redirect to another page using post method and, of course, adding or exchanging some data in the form. Is it possible?
I dont want to use request.sendRedirect method. Because it uses get method and it s put everything on the URL. I need send using post method.....
Ill pay for that. :))))
I tryied do that but didnt work. I tryied change the value of a field but nothing...
Did you do something like that?
> You can try the jsp:forward.
> > <jsp:forward page="newPage.jsp">
> <jsp:param name="somename" value="somevalue" />
> </jsp:forward>
>
Ok, probably works but how I can change the value of a request value?
For example:
In my jsp page I have
<form method="post" action="test.jsp">
<input type="hidden" name="field1" value="1">
...
In test.jsp ....
String tmp = request.getParameter("field1");
if (tmp.equals("1")) tmp = "2";
... now I need redirect to page test2.jsp sending the new value. Thats the problem. How I can update the request object with this value or how create a new (HttpServletRequest) to use with RequesterDispatcher?
Tanks for help.....
> try RequesterDispatcher..