Announcement Announcement Module
Collapse
No announcement yet.
How to reach the model from the request Page Title Module
Move Remove Collapse
X
Conversation Detail Module
Collapse
  • Filter
  • Time
  • Show
Clear All
new posts

  • How to reach the model from the request

    Hi

    Are there any convenient way of accessing the model from the HttpServletRequest submitted?

    I would like to inject a model value as a parameter in the same request..

    Thank you!

  • #2
    I don't really know what you're getting at.

    The process is as follows:

    - request is submitted and handled by a controller
    - controller returns ModelAndView
    - in case of a JstlView for example, the model (the map from the ModelAndView object) is merged into the HttpServletRequest as attributes, hence accessible through the HttpServletRequest in your JSPs). Other View subclasses (VelocityView, XsltView) might make the model accessible using something else, the VelocityContext for example).

    regards,
    Alef

    Comment


    • #3
      Hi and thanks for answering.

      That clarifies it, I'm a victim of my own poor design att the moment, and I'm forced to get a string put in the model as a request parameter, not attribute. But I'll try to find a workaround.

      Thanks again!

      Comment

      Working...
      X