i am doing a simple search program using jsp. it contains the features like
login, logout and search. the user allow to do search even if they haven't
login. but, if the want to view the information of the book after searching,
they must login first.
i can check whether the user has login or not by checking their login id.
the question if i detected they haven't login, how can i prompt out a alert
message "Please Login Now" , after they click ok, i will forward them to
login page like this:
if (session.getAttribute("menu") != "yes")
//...prompt alert message here ????
<jsp:forward page="login.jsp" />
thanks in advance!