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

Parameter getting truncated.

 
Rohit Poddar
Ranch Hand
Posts: 36
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I have code like this in my JSP.
<jsp:include page="/templates/standardcontentpod.jsp" flush="true">
<jsp aram name="podHead" value='<%= name %>'/>
</jsp:include>
Now the 'name' might have an '&' in it like 'Mason & Company'.
What happens now is in /templates/standardcontentpod.jsp when I do
String podHead = request.getParameter("podHead");
I only get 'Mason ' and rest of it gets truncated. That might be happening as it might be considered as a query string and since all the params in qString are separated by an '&' app server is thinking that anything after '&' is another param.
Do you guys have a colution for it?
Thanks,
Rohit
[ August 19, 2003: Message edited by: Rohit Poddar ]
 
Bear Bibeault
Author and ninkuma
Marshal
Pie
Posts: 65335
97
IntelliJ IDE Java jQuery Mac Mac OS X
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
The parameter value needs to be URL-encoded. Check out java.net.URLEncoder for details.
hth,
bear
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic