• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Paul Clapham
  • Jeanne Boyarsky
  • Junilu Lacar
  • Henry Wong
Sheriffs:
  • Ron McLeod
  • Devaka Cooray
  • Tim Cooke
Saloon Keepers:
  • Tim Moores
  • Stephan van Hulst
  • Frits Walraven
  • Tim Holloway
  • Carey Brown
Bartenders:
  • Piet Souris
  • salvin francis
  • fred rosenberger

help with redirect encoding

 
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.
 
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
 
I love a good mentalist. And so does this tiny ad:
Devious Experiments for a Truly Passive Greenhouse!
https://www.kickstarter.com/projects/paulwheaton/greenhouse-1
    Bookmark Topic Watch Topic
  • New Topic