The moose likes JSP and the fly likes LogOut.jsp Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » JSP
Bookmark "LogOut.jsp" Watch "LogOut.jsp" New topic


Gayathri Neti

Joined: Mar 08, 2002
Posts: 25
I have a web application developed in JSP, TomCat 4.1.18.
In the application, I am logging a user and setting the userId in the session. After the user does whatever he needs to do, he would click on LogOut.
In the LogOut.jsp, I have the following code.
<%@ page language= "java" %>
<%@ page import="javax.servlet.http.HttpSession" %>
out.println("called Me");
My problem is that 'login.jsp' is never being called. Instead, it's staying on the screen from where I clicked 'LogOut'.

Can any body help me?? :roll:
Praful Thakare
Ranch Hand

Joined: Feb 10, 2001
Posts: 642
Hi Gayathri ,
i dont think there is any problem in logout.jsp
could u post ur code where there is link for logout.jsp!!!
And if at all logout.jsp is called only when u wish to logout then i dont think there is need of

All desirable things in life are either illegal, banned, expensive or married to someone else !!!
Gayathri Neti

Joined: Mar 08, 2002
Posts: 25
Yeah, you are correct. I was trying all different things to debug it. it is. I am pasting a part of the main page. The main page doesn't have any JSP in it.
<%! String logout = "true"; %>
<table width="90%" height="80%" border="0" cellpadding="0" cellspacing="0" bordercolor="#003399" >
<td height="31" align="center"><a href="LogOut.jsp?logout=<%=logout%>" ><font color="#FFFFFF" size="2" face="Verdana, Arial, Helvetica, sans-serif">Log Out </font></a></td>
David Hibbs
Ranch Hand

Joined: Dec 19, 2002
Posts: 374
I don't see anything wrong in what you posted... have you checked your server stderr and stdout for messages? A blank screen sounds like there was probably an exception of some kind. Or, maybe a 404 occurred sending you to a custom 404 mask which is blank? So some other questions...
Do you have a custom 404 mask defined?
Do you have a custom error page defined?
What does the login page do when a user hits it the first time?
Have you checked your access log to see what page was requested?
Maybe these items will give you some ideas where to look...

"Write beautiful code; then profile that beautiful code and make little bits of it uglier but faster." --The team, Newsletter 039.
I agree. Here's the link:
subject: LogOut.jsp
It's not a secret anymore!