question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

ExceptionHander: Lost session when session tracking mode is 'URL'

See original GitHub issue

When session tracking mode is configured as URL in web.xml, ExceptionHander don’t append the jsessionid param to the location of error page, the session is lost and, all the exception info is lost in page error.

To Reproduce Configure sesion tracking mode as URL in web.xml,

<session-config>
        <tracking-mode>URL</tracking-mode>
</session-config>

Configure ExceptionHandler as usual in faces-config.xml, launch a exception, and in the redirect error page, the jsessionid param is missing and the exception info is lost.

In ajax mode without redirect the ExceptionHander works properly.

Environment All versions of PF and JSF.

Example proyect: primefaces-test-exceptionhandler.zip

Expected behavior When session traking is ‘URL’ the jsessionid must be appended to the location of error page.

Workarround in PF 9.0 In PF 9.0 you can add manually the jsessionid to the location page in web.xml with EL expresion <location>/error.jsf;jsessionid=${session.id}</location> but i think it’s not the correct solution

Issue Analytics

  • State:closed
  • Created 3 years ago
  • Comments:5 (5 by maintainers)

github_iconTop GitHub Comments

1reaction
dgoicochetacommented, Dec 9, 2020

Ok, tested with mojarra 2.2 and 2.3 (2.2.20, 2.3.14), and myfaces 2.2 and 2.3 (2.2.12, 2.3.7) and it’s work.

0reactions
mellowarecommented, Dec 9, 2020

Excellent thanks for testing!

Read more comments on GitHub >

github_iconTop Results From Across the Web

java - How to change DefaultSessionTrackingModes when ...
Let me answer here: So is there any way to change the Default Session Tracking Mode. Yes. Use ServletContext.setSessionTrackingModes(Set< ...
Read more >
Servlet - Session Tracking Modes - LogicBig
This example demonstrates the session tracking mode 'URL'. Note that we have to append session id with hyperlink ourselves.
Read more >
Session Tracking modes in Spring security - SpringHow
In this post we will see about different type of session tracking modes and how they work. ... Unlike Cookies, the URL tracking...
Read more >
Web on Servlet Stack - Spring
In turn, the DispatcherServlet uses Spring configuration to discover the delegate components it needs for request mapping, view resolution, exception handling, ...
Read more >
Session Lost after publishing website on remote server - MSDN
Try to identify on which page you are loosing session, and implement exception handling every where in your code. Wednesday, January 18, 2012...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found