Jakarta SESSION Taglib Example


<%@ taglib uri="http://jakarta.apache.org/taglibs/session-1.0" prefix="sess" %>




Session Information:  

       CreationTime: 
          SessionId: 
   LastAccessedTime: 
MaxInactiveInterval: 

Set an attribute named "myatt"
AAbb
See if myatt attribute exists

   myatt=


   Attribute myatt does not exist.

Set an attribute named "myatt2" to the session max inactive interval

See if myatt equals "aabb"

  myatt=


  Attribute myatt does not equal "aabb".

See if myatt equals "aabb", ignoring case

  myatt=


  Attribute myatt does not equal "aabb", ignoring case.

Now loop through all the attributes

    = 

Now remove the attribute myatt

See if myatt attribute exists

   myatt=


   Attribute myatt does not exist.



Is Session New? Session is new. Session is not new.

Set max inactive interval to 900 seconds for session: 900

Check to make sure max inactive interval got set>

New max inactive interval = seconds

Now set max inactive interval back to the original value:



Check to make sure max inactive interval got set back to original value:

Max inactive interval = seconds