chkal/pf-issue-test — Issue #15: Session id lost on prettyfaces redirect without cookies
Author: chkal
Created: 2012-03-06 07:16:14+00:00
State: open

Originally filed by **metaphy...@gmail.com** on 2009-05-27T12:15:25

Google Code issue: http://code.google.com/p/prettyfaces/issues/detail?id=12

What steps will reproduce the problem?

- Have a JSF app that relies on session information.
- Create one JSF page with prettyfaces mapping and a JSF form.
- Have another page with prettyfaces mapping.
- Let an action method of the form return a prettyfaces mapping like
"pretty:someMappingId", that points to the oher page.
- Browse and post the form with cookies disabled.

What is the expected output? What do you see instead?

When the action method returns the pretty:id mapping for another page, the
redirect to the other page should take care of the session id. That is the
HTTP Location header should include the session id if cookies are disabled.
Instead the Location header does not have the session information and the
session is lost on the other page.

What version of the product are you using? On what operating system?
prettyfaces 1.2.4-pr1, Sun JSF 1.2.12, Java6, Tomcat 6.0.18, Linux

(The patch posted on the mailing list did not resolve the problem.)
But I saw in the logs that PrettyNavigationHandler is doing the redirect.
And adding encodeActionURL() in this class to the prettyRedirect() method
resolves the problem.