• 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
  • Tim Cooke
Sheriffs:
  • Knute Snortum
  • Junilu Lacar
  • Devaka Cooray
Saloon Keepers:
  • Ganesh Patekar
  • Tim Moores
  • Carey Brown
  • Stephan van Hulst
  • salvin francis
Bartenders:
  • Ron McLeod
  • Frits Walraven
  • Pete Letkeman

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.
 
It is sorta covered in the JavaRanch Style Guide.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!