What do you mean by construct the path?
If you want to return the user to the login/front page insert a redirect statement in your code. I use the following line:
response.sendRedirect("login.jsp?loginFailed=true" );
In this example login.jsp accepts a parameter, 'loginFailed'.
When the page opens with this parameter set to true an error message will appear, if false there is no error message. Obviously you will need to code a test for the parameter and display the relevant message in login.jsp (or index.jsp in your case).
|