Results 1 to 4 of 4

Thread: Adding to request

  1. #1
    Join Date
    Feb 2005
    Posts
    9

    Default Adding to request

    I would like to add an attribute to the request, just before I return a ModelAndView. Is this possible and if so, how?

    Thanks

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

    Default

    Everything in the model is automatically added to the request by Spring. You can also add stuff yourself (request.setAttribute(x, y)), which is essentially exactly the same if you're using a view technology that uses the HttpServletRequest to retrrieve its attributes from.

    Note however that this is not the recommended approach. If you're using Velocity as the view technology, the HttpServletRequest isn't available. Use the ModelAndView instead!!
    Alef Arendsen
    SpringSource
    http://www.springsource.com

  3. #3
    Join Date
    Feb 2005
    Posts
    9

    Default

    What about adding something to the querystring. I have tried adding to the request, but code that is beyong the scope of my project is looking for a querystring argument. Can I add an argument to the querystring. Is this possible?

    Thanks

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

    Default

    Errr no, you can't modify the query string AFAIK.
    Alef Arendsen
    SpringSource
    http://www.springsource.com

Similar Threads

  1. Hibernate Long Session Per Flow?
    By akw in forum Web Flow
    Replies: 21
    Last Post: Dec 12th, 2005, 08:06 PM
  2. Replies: 9
    Last Post: Nov 1st, 2005, 10:36 PM
  3. stale Oracle processes
    By compostellas in forum Data
    Replies: 7
    Last Post: Jun 27th, 2005, 12:14 PM
  4. Replies: 8
    Last Post: Dec 7th, 2004, 06:13 PM
  5. Replies: 2
    Last Post: Sep 5th, 2004, 10:49 AM

Posting Permissions

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