This week's book giveaway is in the Android forum.
We're giving away four copies of Head First Android and have Dawn & David Griffiths on-line!
See this thread for details.
The moose likes Servlets and the fly likes login and status error 400 Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login

Win a copy of Head First Android this week in the Android forum!
JavaRanch » Java Forums » Java » Servlets
Bookmark "login and status error 400" Watch "login and status error 400" New topic

login and status error 400

Alessandro Ilardo
Ranch Hand

Joined: Dec 23, 2005
Posts: 218
Hi there,
I've got a problem when a user retry to login after he just logout.
When a user request the log out action from my servlet, it runs this code:

This works fine, the client is correctly redirect to the login page.

The problem comes up when the user retry to login on the same page after the redirect. After he submits user and password, it gets a 400 status.

This happens only when the user try to login on the same page he's been redirect after the logout. If he try to go to main index and from there go back to the login page, it works fine.

On the http monitor I gets this message:


Invalid direct reference to form login page

What happens??

trying to decode a woman mind....
Christophe Verré

Joined: Nov 24, 2005
Posts: 14688

Are redirecting to a jsp which is defined as <form-login-page> ?
If so, you should read this the following article, and avoid redirecting to the login page :

[My Blog]
All roads lead to JavaRanch
Alessandro Ilardo
Ranch Hand

Joined: Dec 23, 2005
Posts: 218
thank you.
I agree. Here's the link:
subject: login and status error 400
It's not a secret anymore!