Issue
I need to access the Manager from the servlet (or filter) in Tomcat to load the custom session by custom session ID.
Answering your next question: why do I need it. There's an old bug in Flash that causes it to send cookies from IE and not from the current browser. So, if I'm in FF and I'm trying to upload the file with SWFUpload I end up with the wrong session and an error.
I want to add the magic parameter to POST that should override the default (wrong) session id, then load the custom session instead of one loaded by Tomcat. I can't use URL rewriting since cookies are resolved first, and when flash sends wrong cookie from IE, Tomcat doesn't try to load the session from url-rewritten address.
I'd appreciate any other hint how to access Manager from context or a solution of the original problem.
Thanks in advance, Juriy
Solution
It should be accessible via the implementation of ServletContext
. Get the sources of tomcat to check that, or use reflection to get all fields of the context. You may have to use lots of reflection to get to the manager.
(I couldn't find whether the manager is exposed in JNDI, but you can look there as well)
Answered By - Bozho
Answer Checked By - Candace Johnson (JavaFixing Volunteer)