Win a copy of Java 9 Revealed this week in the Features new in Java 9 forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

Parameter getting truncated.  RSS feed

 
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
Posts: 65897
135
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
 
Don't get me started about those stupid light bulbs.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!