• 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
  • Liutauras Vilda
  • Bear Bibeault
  • Jeanne Boyarsky
  • paul wheaton
Sheriffs:
  • Junilu Lacar
  • Paul Clapham
  • Knute Snortum
Saloon Keepers:
  • Stephan van Hulst
  • Ron McLeod
  • Tim Moores
  • salvin francis
  • Carey Brown
Bartenders:
  • Tim Holloway
  • Frits Walraven
  • Vijitha Kumara

Redirected to jsp page but URL in address bar is still .do  RSS feed

 
Ranch Hand
Posts: 170
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi!

I have a socialSignUp.jsp page which submits to SocialSignUpAction.do page which processes the information.

After that it redirects to enterAddress.jsp page. But in the browser URL, it is still SocialSignUpAction.do page although the enterAdress.jsp page is shown.

What could be wrong? Please help. Thanks.

My Config.xml:




My form, socialSignUp.jsp:



in SocialSignUpAction.java file:


 
Ranch Hand
Posts: 614
9
BSD Java
  • Likes 1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
That is the feature of RequestDispatcher.
By calling forward() method, you actually are telling the server to display the output using the JSP.
You are not telling the server to send new HTTP request to the JSP.

You need to learn more about RequestDispatcher.forward() and response.sendRedirect() methods.
 
Alan Blass
Ranch Hand
Posts: 170
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi Tapas,

I am using Struts. not the usual Java. I have tried to use mapping.findForward("mobileNewAddress") but still the same results.

Please help on how to use Struts with redirecting to the .jsp page.

Thanks.
 
You ought to ventilate your mind and let the cobwebs out of it. Use this cup to catch the tiny ads:
global solutions you can do in your home or backyard
https://coderanch.com/t/708587/global-solutions-home-backyard
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!