[JAVAEETUTORIAL-156] guessnumber example: confusing URLs Created: 22/Feb/13  Updated: 28/Mar/13  Resolved: 28/Mar/13

Status: Closed
Project: javaeetutorial
Component/s: doc
Affects Version/s: 6.0.8
Fix Version/s: None

Type: Improvement Priority: Minor
Reporter: swiss-chris Assignee: Unassigned
Resolution: Works as designed Votes: 0
Labels: None
Remaining Estimate: 5 minutes
Time Spent: Not Specified
Original Estimate: 5 minutes

Tags: url


The guessnumber example (http://docs.oracle.com/javaee/6/tutorial/doc/gipob.html) displays http://localhost:8080/guessnumber/faces/greeting.xhtml in the address bar of my browser when I'm on the response.xhtml page and http://localhost:8080/guessnumber/faces/response.xhtml when I go "Back" to the greeting.xhtml page.

I don't know all the possible ways of correcting this, but one that works for me is changing action="greeting" to action="greeting?faces-redirect=true" in the response.xhtml File.

Comment by swiss-chris [ 27/Feb/13 ]

The same happens in the bookmarks/ application.

Comment by Kim Haase [ 28/Mar/13 ]

The fact that a displayed URL always lags behind the displayed page is a result of the fact that Facelets uses POST rather than GET. If you force a redirect, this causes more server resources to be used and, in complex applications, may lead to erroneous results.

Generated at Sun Oct 23 23:06:33 UTC 2016 using JIRA 6.2.3#6260-sha1:63ef1d6dac3f4f4d7db4c1effd405ba38ccdc558.