Results 1 to 3 of 3

Thread: How to reach the model from the request

  1. #1
    Join Date
    Aug 2004
    Location
    Stockholm
    Posts
    466

    Default 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!
    Sincerely,
    /The Cantor

    "Murphy was an optimist"
    (The O'Toole commentary on Murphy's Law)

  2. #2
    Join Date
    Aug 2004
    Location
    Amsterdam, Netherlands
    Posts
    450

    Default

    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
    Alef Arendsen
    SpringSource
    http://www.springsource.com

  3. #3
    Join Date
    Aug 2004
    Location
    Stockholm
    Posts
    466

    Default

    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!
    Sincerely,
    /The Cantor

    "Murphy was an optimist"
    (The O'Toole commentary on Murphy's Law)

Similar Threads

  1. Replies: 17
    Last Post: Jan 2nd, 2007, 01:43 PM
  2. Hibernate Long Session Per Flow?
    By akw in forum Web Flow
    Replies: 21
    Last Post: Dec 12th, 2005, 08:06 PM
  3. Replies: 9
    Last Post: Nov 1st, 2005, 10:36 PM
  4. Loosing my SecureContext
    By sklakken in forum Security
    Replies: 3
    Last Post: Jul 21st, 2005, 01:44 PM
  5. Content Provider vs View Model
    By Martin Kersten in forum Swing
    Replies: 21
    Last Post: Mar 10th, 2005, 02:25 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •