myfaces-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Stephen Friedrich <>
Subject Re: navigation/form: wrong url displayed in browser
Date Wed, 02 Apr 2008 20:58:17 GMT
You can't always show the same URL, but using the redirect-after-post pattern (similar
to the first solution sketched briefly in the myfaces wiki), is a standard solution.
Not only does it solve the "one-url-behind-problem", but it solves the problem of stupid
browser warnings when the user tries to refresh the page (e.g. presses f5).

See here for a nice article:

Propagation of request parameters and faces messages is indeed a problem.
JBoss Seam solves this quite nicely using page scoped parameters and conversations.
I am not sure about the apache pendant "orchestra".

arne anka wrote:
> hi,
> i created three pages:
> /index.jspx
> /search/search_simple.jspx
> /search/search_results.jspx
> index.jspx contains a jscookmenu directing to search_simple.jspx (by 
> navigation-rule), search_simple.jspx sends a form to a backing bean 
> which in turn (by navigation-rule) directs to search_results.jspx.
> surfing to
> http://localhost/foo/
> renders index.jspx, chosing search_simple.jspx from the menu renders the 
> page (search_simple.jspx) correctly -- but the browser now shows
> http://localhost/foo/index.jsf
> in the url field.
> submitting the rendered formular directs to search_results.jspx -- but 
> now the url filed shows
> http://localhost/foo/search_simple.jsf
> ie the url displayed is always one page behind.
> i am sure it is some kind of beginners fault but i do not find any hints 
> how to solve, so please -- how do i correct that?
> i would happily get rid of the whole url thing (ie the browser could 
> always show http://localhost/foo/ regardless what page is rendered), but 
> if the url is displayed it should be the right one.
> regards

View raw message