Forums Register Login

help with redirect encoding

+Pie Number of slices to send: Send
Hi ranchers!
I am facing a problem with response.sendRedirect(response.encodeRedirectURL()) method .I have a form which takes a comment field in a textarea.I submit the form to a jsp page say test1.jsp which takes the value of the comment as request.getParameter.Then i need to pass this value to an intermediate page say test3.jsp using response.sendRedirect(newUrl)>This newUrl contains the comment parameter in the query string as in test3.jsp?sComment="+sComment .If this comment contains any special characters such as % ,? then these values are not passed to test3.jsp.
The flow is like this :
(submit) redirect redirect(QueryString)
form.jsp --> test1.jsp -->test2.jsp --->
test3.jsp
Now why is this happening?Can anyone suggest anything?
Thanx,
Vedhas.
+Pie Number of slices to send: Send
Hi,
Normally, see ur browser settings, some browser uses %20 or % for spaces. So you would get space instead of %.
Thanks & Regards
Raj Paul
Of course, I found a very beautiful couch. Definitely. And this tiny ad:
a bit of art, as a gift, the permaculture playing cards
https://gardener-gift.com


reply
reply
This thread has been viewed 487 times.
Similar Threads
Javascript coding problem for two submit buttons in one form
Form Input Box that with the right 4 digit number will display a selected page on my site
changing parmeter value in URL
Session values still exist after using response.sendRedirect()
IllegalStateException in JSP
More...

All times above are in ranch (not your local) time.
The current ranch time is
Apr 16, 2024 04:30:50.