Announcement Announcement Module
Collapse
No announcement yet.
Accessing data model set defined in a controller using a servlet filter Page Title Module
Move Remove Collapse
X
Conversation Detail Module
Collapse
  • Filter
  • Time
  • Show
Clear All
new posts

  • 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

  • #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

    Comment

    Working...
    X