• 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:
  • Jeanne Boyarsky
  • Liutauras Vilda
  • Campbell Ritchie
  • Tim Cooke
  • Bear Bibeault
Sheriffs:
  • Paul Clapham
  • Junilu Lacar
  • Knute Snortum
Saloon Keepers:
  • Ron McLeod
  • Ganesh Patekar
  • Tim Moores
  • Pete Letkeman
  • Stephan van Hulst
Bartenders:
  • Carey Brown
  • Tim Holloway
  • Joe Ess

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.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!