Announcement Announcement Module
Collapse
No announcement yet.
Using request.setAttribute in interceptor - good or bad? :) Page Title Module
Move Remove Collapse
X
Conversation Detail Module
Collapse
  • Filter
  • Time
  • Show
Clear All
new posts

  • Using request.setAttribute in interceptor - good or bad? :)

    Hi!

    We have an object (a topicmap object) that is created in the beginning of the request (we create it in an interceptor) and it should live until the end of the request. It should be possible to access this object from handleRequest.

    Is using request.setAttribute in the interceptor a good way of doing this and the access this object with request.getAttribute in handleRequest? Or is this a misuse of the request.setAttribute method? Any better ways of doing this?

    TIA!


    -Kaj

  • #2
    What you describe sounds perfectly fine. The request attributes only have a short lifetime and are the way to pass things around in chained handlers or through interception.

    S.

    Comment


    • #3
      Goooood! Thanks for answering!


      -Kaj

      Comment

      Working...
      X