Logging out.


Web tier: servlets, JSP, Web frameworks: Logging out.

  1. Logging out. (2 messages)

    I have used form-based authentication to authenticate a user and this works fine on the J2EE server. (i.e. used a jsp with a form that has a ACTION="j_security_check", user="j_username",password="j_password").

    Now my questions are :
    1 - How do I log out? I tried session.invalidate() in the logout.jsp but it didnt work. (only works when I refresh the browser).

    2 - When I hit submit on the login.jsp page how do I direct to the target URL?? If I have index.html with a hyperlink to page1 (lets say) that requires authentication then I get redirected to the login.jsp page and then when I successfuly log in, I access page1. However, if I go to the login.jsp page and hit submit I get the j_security_chekc in the url and hence I get page not found this is becuase the target is not known (i guess). So how do get round this simple problem.

    Thanks a lot


    Threaded Messages (2)

  2. Logging out.[ Go to top ]

     Can u send me yr code. I can tell u after reading it.
  3. Logging out.[ Go to top ]

    Can you point me to documentation on how to use j_security_check for authentication?