views:

170

answers:

1

I have an application that supports multiple types of login using username+password, using open id, etc.

Technology used : GWT. Login url = Login.html and Login Failure url = Login.html?error=true

as shown above, the login page (made in GWT) can determine that whether its just opened for first time or whether its opened after an error.

However, i am not able to determine the type of error a similar post here: Post link shows how to set the message to a custom one, But i require a programming approach: eg if open id login fails, I must show user a panel to enter his name, etc.

Is there any way to achieve this ?

For those not knowing GWT:

Let me change the problem a bit, suppose that my login page is not a JSP but a servlet, how do i write code in my servlet that is able to access the type of error occured during login? (Actually this does not solve the GWT issue, but it may give me a 'heads up' of what is needed to be done.)

+1  A: 

Well you don't have to redirect your failed login to a jsp - it can be any URI. For instance you can redirect them to the URI http:/www.myserver.com/failed which is a completely different servlet (could be a servlet that does nothing but sends a redirect to a new URL even).

Gandalf
i didnt understand your point,how does that return to my login screen ?It opens up a new url altogether.My requirement is to show the user the error on the login screen itself.however, i have thought abt error.jsp returning value to Login.html via a cookie (using url parameters would have solved it) but if the user bookmarked login, he sees same error every time
Salvin Francis