Results 1 to 3 of 3

Thread: Using HttpSession in Controller - Best Practice?

  1. #1
    Join Date
    Feb 2007
    Posts
    4

    Default Using HttpSession in Controller - Best Practice?

    I believe I posted this inappropriately in Web.
    I am new to Spring.

    I have been told in the past to avoid setting attributes in the session of our web application unless it is user information that would be needed for the length of the session.

    I see Session beinused throughout Controllers.
    Is this a Best Practice? Are there examples where this is not used?
    Can someone please share the Pros and Cons?

    Thanks!

    JHerilla

  2. #2
    Join Date
    Sep 2006
    Location
    UK
    Posts
    8,424

    Default

    Are you basically asking what you should or shouldn't put i the session?

  3. #3
    Join Date
    Feb 2007
    Posts
    4

    Default Sorry not to have been clear...

    I was given a demo on using the Spring Framework.

    It consisted of a screen that listed elements, the ability search., then add/update.

    It included the use of a filter being stored in the session, in order to know what was being submitted for the search. The request to the formBackingObject was used to get the session, and get a filter if it had been used before.

    I am not used to using session in this manner, and wanted to know if this is a best practice. Generally, I would get the inputs from the request.

    I am hoping to learn Best Practices from the get-go.

    JHerilla

Posting Permissions

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