Two web applications share session object

 

I created two web applications: webA and  webB, they are deployed in the same server.  webA actually is a luminis channel with a link, then the link will lead to webB (standalone).
In webA, I store iperson’s object in session and try to pass that session to webB, that also means two different web applications share one session object, does any body know how can I do the configuration so that webB can share the session object which webA created.  
 
Thanks,
 
Zhen

Comment viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.

Not easily

It is very difficult to share data across web applications.  One reason is that there is no guarentee that they actually do share the same session object.  The servlet standard would even imply that they should not because the should not have overlapping session attributes.  Another reason is that different web applications have different class loaders.  Classes loaded from WEB-INF/lib in one application are not available to another application, even if they have an exact copy of the jar file.  Classes such as the Java runtime and (proably) the servlet API will be shared.

Probably the best way to share data is via the URL or POST data.  Portlets give a limiited second possibility that might meet your needs via user information, which in Luminis terms will allow passing IPerson attributes to a portlet, which can then be shared with servlet in the same web application.

Pass through url or post will cause security problem

Pass through url or post will cause security problem

Security solutions

If by security problem, you mean that the data becomes visible to the user you can always encrypt it.

We also need to check webA's session status from webB

We also need to check webA's session status from webB

Syndicate content