Public: Concord Software Projects : Design for passing session info to SAIL
This page last changed on Aug 31, 2009 by aunger.
Per a discussion with Stephen in IRC (http://rails.dev.concord.org/irclog/otrunk/2009-08-28.html#T18-35-44), here's a description of a way to pass session information into a SAIL session and have the info automatically included in HTTP requests made from the Java environment, in effect making the Java code aware of an existing http session.
Basically the idea is to create a Cookie SAIL Service which is initialized via the config file which defines the services for a SAIL session. The SDS (or equivalent web app) would embed whatever cookie information it wanted into the config. For example:
The cookie service would take it's set of passed in cookie definitions, and then set up a new java.net.CookieHandler (or it itself could be one), which it then registers as the global CookieHandler via CookieHandler.setDefault(CookieHandler). This CookieHandler would then embed cookies with the appropriate session information on appropriate requests, thus allowing the Java code to continue the existing http session started in the browser.
|Document generated by Confluence on Jan 27, 2014 16:52|