ranam
Jan 11th, 2011, 09:31 AM
Hi
I am using Spring MVC 3.0 to develop a web application.
According to the architecture that I have got for my project, I would need to have the HttpServletRequest object in all the Controller methods that I have got in order to decide view path and for other frequently required attributes.
I know that I can have HttpServletRequest object as an argument in all the methods but that doesn't seem to be the best solution to me. It would be nice to have a reusable method somehow which I can call from any controller in order to get back the specified object from the Request object. Can someone please suggest me a way out?
Any help would be appreciated.
Many Thanks
Rana
I am using Spring MVC 3.0 to develop a web application.
According to the architecture that I have got for my project, I would need to have the HttpServletRequest object in all the Controller methods that I have got in order to decide view path and for other frequently required attributes.
I know that I can have HttpServletRequest object as an argument in all the methods but that doesn't seem to be the best solution to me. It would be nice to have a reusable method somehow which I can call from any controller in order to get back the specified object from the Request object. Can someone please suggest me a way out?
Any help would be appreciated.
Many Thanks
Rana