Win a copy of The Little Book of Impediments (e-book only) this week in the Agile and Other Processes forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

help with redirect encoding

 
Vedhas Pitkar
Ranch Hand
Posts: 445
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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.
 
Raj Paul
Ranch Hand
Posts: 77
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,
Normally, see ur browser settings, some browser uses %20 or % for spaces. So you would get space instead of %.
Thanks & Regards
Raj Paul
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic