Win a copy of Modern JavaScript for the Impatient this week in the Server-Side JavaScript and NodeJS forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Ron McLeod
  • Paul Clapham
  • Bear Bibeault
  • Junilu Lacar
Sheriffs:
  • Jeanne Boyarsky
  • Tim Cooke
  • Henry Wong
Saloon Keepers:
  • Tim Moores
  • Stephan van Hulst
  • Tim Holloway
  • salvin francis
  • Frits Walraven
Bartenders:
  • Scott Selikoff
  • Piet Souris
  • Carey Brown

response.sendRedirect not working from bean

 
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 ]
 
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
 
We should throw him a surprise party. It will cheer him up. We can use this tiny ad:
Thread Boost feature
https://coderanch.com/t/674455/Thread-Boost-feature
    Bookmark Topic Watch Topic
  • New Topic