Web Form based login in Java
- by BrunoLM
How can I block access to the site if a user is not logged in?
Under web.xml Security I checked Form authentication then I selected Login and Error page, but I don't know how to block the access and redirect the user to the login page.
Do I need a filter? If so, how can I get the login url I specified?
And how should I call the validation method? I saw in some examples this code
<form method=post action="j_security_check">
<input type="text" name="j_username" />
<input type="password" name="j_password" />
</form>
What does it do?