This week's book giveaway is in the Jython/Python forum.
We're giving away four copies of Hands On Software Engineering with Python and have Brian Allbey on-line!
See this thread for details.
Win a copy of Hands On Software Engineering with Python this week in the Jython/Python 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
  • Jeanne Boyarsky
  • Bear Bibeault
  • Knute Snortum
  • Liutauras Vilda
Sheriffs:
  • Tim Cooke
  • Devaka Cooray
  • Paul Clapham
Saloon Keepers:
  • Tim Moores
  • Frits Walraven
  • Ron McLeod
  • Ganesh Patekar
  • salvin francis
Bartenders:
  • Tim Holloway
  • Carey Brown
  • Stephan van Hulst

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

 
Ranch Hand
Posts: 169
  • 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: 169
  • 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.
 
See where your hand is? Not there. It's next to this tiny ad:
RavenDB is an Open Source NoSQL Database that’s fully transactional (ACID) across your database
https://coderanch.com/t/704633/RavenDB-Open-Source-NoSQL-Database
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!