-
Jan 23rd, 2009, 12:05 PM
#1
Accessing data model set defined in a controller using a servlet filter
Hello All,
Is there a way to access a data model set in the spring mvc controller using a servlet filter?
For example:
------------
If i have a data model "testObject" defined in a spring mvc controller
theModelAndView.addObject("test", testObject);
How to get the reference of "testObject" in a servlet Filter.?
Thanks in advance.
Jay
-
Jan 23rd, 2009, 01:35 PM
#2
OK, the issue was because of the URL mapping for the servlet filter.
By applying the filter only to the specific URL, I was able to access the model data just by using request.getAttribute("modelObjName")
Jay
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules