aspose file tools*
The moose likes Struts and the fly likes Regarding Query String Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Frameworks » Struts
Bookmark "Regarding Query String" Watch "Regarding Query String" New topic
Author

Regarding Query String

santhosh kumar vk
Ranch Hand

Joined: Aug 25, 2009
Posts: 146
hi,


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


Thanking you.
Ankit Garg
Sheriff

Joined: Aug 03, 2008
Posts: 9313
    
  17

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...


SCJP 6 | SCWCD 5 | Javaranch SCJP FAQ | SCWCD Links
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Regarding Query String