hi,

i have a tomcat web application and it is working properly. i have only javascript and jsp but if user types any url of any jsp without login its displaying that page for that i written the code like this in jsp.... but its not working........ so any one please help me...........

the code is

<% if(null == session.getAttribute("username")){
response.sendRedirect("./jsp/logout.jsp");
}else { %>
<a href="../jsp/useradmin.jsp?">Add User </a> <%} %>

this is not redirecting to login page if i entered url useradmin page directly without login. any one please tell me sollution..