I am using form based authentication in my application. When trying to 
access a protected resource, the container automatically prompts the login
form to the user, where he can fill in authentication info (username and
password). 

Code from login.jsp:

<form method="POST" action="j_security_check">
<input type="text" name="j_username">
<input type="password" name="j_password">
</form>

Here the Servlet-specification dictates that the action to be called from
the login form must be j_security_check, and that the parameters passed from
the form must have the names j_username and j_password.

This way of logging in works very well. But this requires that the user is
trying to access a restricted area of the application. I would like to add
functionality to my application that allows the user to make a direct login
from a public page, without landing at an intermediate login page. Is there
a way to call the j_security_check directly from another page? I have made
some experiments but I have not succeeded. 

Does anyone have any advices regarding this subject. I such a case I would
be very thankful to hear.

Erik Johansson

Reply via email to