• Post Reply Bookmark Topic Watch Topic
  • New Topic

Page Forward Does not Update Url  RSS feed

Adam Zedan
Ranch Hand
Posts: 124
C++ Fedora Java
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Being farely new to jsf but having done some work in servlets and jsp i am a bit confused regarding the concept of page fowarding in jsf

Now in Servelts I know there were basically two ways to forward to another page
1-request.getRequestdispatcher("PageName.jsp").forward; //One way
2-response.sendRedirect("www.somesite.com"); //Two way phenomenon

Each of the above way updated the URL

anyways i am a bit surprised with jsf and i wnated to know why the url updation doesnt work in the following scenario i know i could use redirect but i wanted to know why forward doesnt work in this case

consider in the xhtml page i have the following
<h:commandButton value="Show Recommended Study Plan" action="somepage" /> --->Scenario A

I know i could have gone like this and do double work :
<h:commandButton value="Show Recommended Study Plan" action="somepage?faces-redirect=true" />

but i am more interested in what happens behind the scene in scenario A why the url isnt updated ??

  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!