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

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

    Comment


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

      Comment


      • #4
        Errr no, you can't modify the query string AFAIK.

        Comment

        Working...
        X