• Post Reply Bookmark Topic Watch Topic
  • New Topic

response.sendRedirect not working from bean

 
a jais
Greenhorn
Posts: 2
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
To validate the user, I am calling java bean(scope is request) from my JSP Login screen. When some one enters userid/pwd, validateLogin method of the bean is called:
<%
beanLogin.validateLogin(request,response);
%>
validateLogin method is returning null and if the userid/pwd is correct, the method is redirecting user to the Main Screen:
response.sendRedirect(strMainScreen);
I am running Apache Tomcat 4.0 on my local system and the Login JSP page is working fine on that system. But when I am accessing the page from any other system in the network, upon authentication the user is not redirected to Main Screen and screen is going blank!
Please advise if response.sendRedirect() method do not works from the bean?
[ October 03, 2002: Message edited by: a jais ]
 
inam paki
Greenhorn
Posts: 14
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi;
I faced the same Problem with Tomcat.
n I solved this One by Using the Absolute url.
response.snedRedirect("http://127.0.0.1:8080/servlet/......");
I think u should also check it.
Regards,
 
a jais
Greenhorn
Posts: 2
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi Inam Paki,
Thanks a lot for your hint. And it really works! You really saved my day
I am thankful to Java Ranch team to give us oppertunity to gain from each others experiences.
Regards,
a jais
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!