Results 1 to 1 of 1
  1. #1
    sathya_k_83 is offline Member
    Join Date
    Nov 2007
    Posts
    3
    Rep Power
    0

    Question how to expire a session in struts without using cookies

    i am developing an application using struts 1.2. i have a admin login page(AdminId , Password) .i have set scope="session" in struts-config.xml file for the adminLogin action mapping, so i can access the AdminId in consequentive pages like AddEmployee.jsp, AddProduct.jsp.

    when i logout i should not be able to access AddEmployee.jsp, AddProduct.jsp by directly specifying in the browser or use back button to go to these pages . but i still can access these pages

    can any one tell me some code or way to end a session . the session is set using the struts-config.xml file.

    The below code is used to set the session for the admin login

    <action path="/AdminLoginPath"
    type="org.admin.dev.AdminLoginAction"
    name="AdminLoginFormBean" scope="session"
    input="/AdminLogin.jsp"> <forward name="Login"
    path="/AdminWorkPage.jsp" /> <forward name="HomePage"
    path="/index.jsp" />
    </action>

    scope="session"--> here i set the scope to session
    is there a way to specify in struts-config.xml to expire the session for adminLogin which is specified by the above line of code
    Last edited by sathya_k_83; 11-22-2007 at 02:09 PM.

Similar Threads

  1. Getting all the cookies from Servlet
    By Java Tip in forum Java Tip
    Replies: 0
    Last Post: 01-25-2008, 07:13 PM
  2. Reading cookies in JSP
    By Java Tip in forum Java Tip
    Replies: 0
    Last Post: 01-15-2008, 03:12 PM
  3. JSP cookies example
    By Java Tip in forum Java Tip
    Replies: 0
    Last Post: 01-15-2008, 03:11 PM
  4. Reading cookies from JSP
    By Java Tip in forum Java Tip
    Replies: 0
    Last Post: 12-10-2007, 05:37 PM
  5. cookies question
    By sandor in forum New To Java
    Replies: 1
    Last Post: 05-09-2007, 12:29 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
  •