Announcement Announcement Module
Collapse
No announcement yet.
Accessing model data in view Page Title Module
Move Remove Collapse
X
Conversation Detail Module
Collapse
  • Filter
  • Time
  • Show
Clear All
new posts

  • Accessing model data in view

    I'm in the process of converting a legacy jsp application to something modern and flexible. The first step was the introduction of spring for dependency injection and configuration and this step needs to result in a new release first.

    The problem I have is that I need to use model data in java code embedded in the jsp's. I know EL expressions and how to use them but I need to create local variables and load the data into them.

    Can I and if so how do I access data in my model without using tags but by using <% plain old java code in my jsp %>?

  • #2
    Thanks for the overwhelming support guys!

    The answer is that Spring puts model objects on the request. So a request.getAttribute("attributename") does the trick. I guess it's guru's only here sorry for the interruption.

    Jeroen

    Btw, I still can't find this in the famous FM one should Read before posting.

    Comment

    Working...
    X