From: "Deb Shuvabrata" <[EMAIL PROTECTED]>
Why make this so complicated.If the user types in
incorrect login info then give an error message and
redirect him back to the same login page .....
From Bo Wang:
Thanks for the suggestion, this is a good idea, but the
problem is the customer want that error message to be
there, so if whoever did something wrong, they will know
what they did wrong.
If we redirect them back to the login page, the error
message will be disappear in a short period.
Come on Bo! Think about it! This is not so hard:
login.jsp:
<html>
<%@ page info="login page" %>
<body>
<% if(request.getParameter("error")!=null) { %>
<p>There was an error logging in:
<%= request.getParameter("error") %><br>
Please try again.
</p>
<% } %>
<form method="/webapp/someservlet/">
.
.
.
</form>
</body>
</html>
And somewhere in /webapp/someservlet you might have:
if(!authenticate(username,password))
response.sendRedirect("/webapp/login.jsp?error="+error);
Yes?
Nic Ferrier
___________________________________________________________________________
To unsubscribe, send email to [EMAIL PROTECTED] and include in the body
of the message "signoff SERVLET-INTEREST".
Archives: http://archives.java.sun.com/archives/servlet-interest.html
Resources: http://java.sun.com/products/servlet/external-resources.html
LISTSERV Help: http://www.lsoft.com/manuals/user/user.html