share « Session « JSP-Servlet Q&A

1. Sharing session (JSP) in 2 different project

is there anyway of sharing the Session data across two different JSP (i mean two dynamic web project) projects in the 1st project i test like that

  <%if(session.getAttribute("UserName") != null ){%>

2. Share uploaded file between servlets in session

Can I hold a uploaded file as a session variable and share in between different JSP/Servlets? (i.e the file should be available in pages other than the uploading page.) Or is it necessary ...

3. Share session between web apps

4. Sharing session between different application

no, it's not possible with EJB either. 2 web applications can call the same EJB which (if stateful) may be called in such a way that it uses the same EJB instance with the state left behind by the other web application but they will not share a single HttpSession. And don't think passing the session from one webapp to another ...

5. sharing session among two servers in a distributed application

Rewa, That will depend on the application server you are dealing with. I happen to be familiar with IBM WebSphere Application Server. As an administrator, you can switch on session replication across the running instances of your distributed application (and there are different options with different performance/failover trade-offs). You also have some configuration to do in the associated web server (usually ...

6. Sharing session in Servlet with Applogic

Hi cy, I'm a little confused as to what you are asking. If you are trying to get the values out of an applogic to pass to a servlet then just use for(int i = 0; i < valIn.count(); i++) { key = valIn.getNextKey(); valIn.getVal(key).toString(); //store valIn in object } //pass object to servlet I have not used the HttpSession2, but ...

7. Sharing session across servlets

9. Session sharing issue

Welcome to JavaRanch! But no. The only real option is to implement a mechanism on top of sessions, like Seam does. This is generally done by passing unique tokens around to identify a conversation within a session. I don't know how (or if) it deals with things like Ctrl-click (open link in new tab), though.