Hi,
I have a loginServlet and i am doing a response.sendRedirect. something like
| if (responseCode == 302)
| {
| response.sendRedirect(contextPath + "/login.jsp");
|
| }
| else
| {
| response.sendRedirect(contextPath +
"/login.jsp?status=\"error\"");
| }
In login.jsp we are doing
| <%
| if(request.getRemoteUser() != null){
| response.sendRedirect("test/welcome.jsp");
| }
| %>
When i try to login to the application by giving the
http://localhost:8080/test/login.jsp page, it is working fine. I am redirected
to welcome page if username and password are correct or else redirected to the
same login page.
The problem is that when i give the url as http://localhost:8080/test/ say
http://localhost:8080/test/welcome.jsp then first the login page is displayed (
which is correct ). when i give the correct username and password also, again
the same login page is displayed. I have to refresh the page to go to the
welcome page.
Why is it behaving in such a way. and most importantly what is the solution to
over this problem. (without using META tag in my JSP).
Please respond immediately as it is very urgent.
Thanks in advance,
Bhupesh.
View the original post :
http://www.jboss.org/index.html?module=bb&op=viewtopic&p=3867005#3867005
Reply to the post :
http://www.jboss.org/index.html?module=bb&op=posting&mode=reply&p=3867005
-------------------------------------------------------
SF email is sponsored by - The IT Product Guide
Read honest & candid reviews on hundreds of IT Products from real users.
Discover which products truly live up to the hype. Start reading now.
http://ads.osdn.com/?ad_id=6595&alloc_id=14396&op=click
_______________________________________________
JBoss-user mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/jboss-user