Skip to main content

HttpSession null with tracking-mode URL

Please note these java.net forums are being decommissioned and use the new and improved forums at https://community.oracle.com/community/java.
1 reply [Last post]
hendrik.donner
Offline
Joined: 2013-06-03

Our customer doesn't want to have session tracking with cookies, so i tried to use tracking-mode URL set from the web.xml. This throws a ViewExpiredException on postback on my login page because the HttpSession is always null. Login is done via HttpServletRequest.login() in an action method which returns "Home.xhtml?faces-redirect=true".
I'm on Servlet 3.0, so as far as i understand the documentation everything should work.

Any ideas? Anything i'm still missing?

(I also asked about this problem on stackoverflow, but i guess this is the more appropriate place. For referecne: http://stackoverflow.com/questions/16812111/viewexpiredexception-with-tr...)

EDIT: It's working with

<param-name>javax.faces.STATE_SAVING_METHOD</param-name>
<param-value>client</param-value>

but than i'm running into java.io.NotSerializableExceptions because my backing beans are not fully serializable.

Why it's not working with STATE_SAVING_METHOD set to server? Is this unsupported? A bug?

Reply viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.
hendrik.donner
Offline
Joined: 2013-06-03

Fixed by updating Mojarra. Somehow my Glassfish 3.1.2.2 comes with Mojarra 2.1.6 and i was running into https://java.net/jira/browse/JAVASERVERFACES-2143.