• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Regarding Query String

 
santhosh kumar vk
Ranch Hand
Posts: 152
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
hi,


How to pass + sign in query sting using jsp and how can we get it in struts action.


Thanking you.
 
Ankit Garg
Sheriff
Posts: 9528
33
Android Google Web Toolkit Hibernate IntelliJ IDE Java Spring
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
The query string is automatically added to the URL by the browser if you have a <form> tag in your page whose method is set to GET (which is the default) and you submit that form. How you get this in Struts depends upon the version of Struts you are using. Struts automatic converts the request parameters to properties of ActionForm (Struts 1) or Action or Model driven object (Struts 2). If you want access to the complete query string, then in Struts 1 you have direct access to the HttpServletRequest object which has a getQueryString method. In Struts 2 your action can implement the ServletRequestAware interceptor to get access to the HttpServletRequest object...
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic