tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Mark Thomas <>
Subject Re: Reg form based authentication
Date Sat, 01 Oct 2005 14:55:29 GMT
sree kanth wrote:
> Hi all,
> i have been developing on JSP's for the last one year,but still i have never
> implemented form based authentication.
> Can any one help me in implenting form based authentication?
> Thank you all
> Sreekanth

Very basic example:
Put login.jsp and error.jsp in the root of your application and add 
the web.xml snippet to your application's web.xml file.


     <form method="POST" action='<%= 
response.encodeURL("j_security_check") %>' name="loginForm">
       <input type="text" name="j_username" size="16" id="username"/>
       <input type="password" name="j_password" size="16" id="password"/>
       <input type="submit" value="Submit" />
       <input type="reset" value="Reset" />

     <title>Login Error</title>
     <p>Login failed.</p>

web.xml snippet

To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message