• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Tim Cooke
  • Ron McLeod
  • paul wheaton
  • Jeanne Boyarsky
Sheriffs:
  • Paul Clapham
  • Devaka Cooray
Saloon Keepers:
  • Tim Holloway
  • Roland Mueller
  • Himai Minh
Bartenders:

Passing session between two web application

 
Greenhorn
Posts: 10
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Dear all,

I have this problem.



I want to pass session from E-system JSP page to a Alfresco DMS JSP page.
I have tried many methods but still fail.

Is there any way to do this?
This two application locate in same tomcat server

Thanks you.
 
Ranch Hand
Posts: 308
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Your question of sharing the session is not clear or not complete.

I want to pass session from E-system JSP page to a Alfresco DMS JSP page.
I have tried many methods but still fail.

Is there any way to do this?
This two application locate in same tomcat server



Are these running in two different JVM's? Assuming there can be more than one jvm's running in one application server.

If not what is the operation you are truying to do on the Alresco DMS application. If it is a 'get' or 'post' use HttpClient to access the second's UI layer from first's business layer.
 
Wang Hsin Yoong
Greenhorn
Posts: 10
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Thanks for your reply.

I think this two web application is running under a same JVM. I am not very sure abt this because i only install one JDK in my workstation.

The Alfresco DMS do not support the GET method which i read this from their forum.

I am writing a JSP form (called bridge.jsp) to pass the username and password from the E-system to Alfresco DMS through session. The bridge.jsp in locate at the E-Systems application. While I try to retrieve the username and password through the session from Alfresco DMS (using login.jsp), it retrieve NULL value with the same session variable in Alfresco DMS.

When i try to debug this problem, i am using the E-System application to retrieve back the username and password through the session, it works by return the exact username and password. This show that this two application is using two different session space, am i right? how to join this two application session space into one?

Thanks you.
 
Ranch Hand
Posts: 2874
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Similar thread found.
 
jiju ka
Ranch Hand
Posts: 308
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator


When i try to debug this problem, i am using the E-System application to retrieve back the username and password through the session, it works by return the exact username and password. This show that this two application is using two different session space, am i right?


You are right. Both application have two different sessions.




how to join this two
application session space into one?


Each session have it's own session id. You are thinking in a way that both sessions should have same session id. In my opinion this is not the right way to go.

lets rewind a little back. What you listed in this thread is a solution which you think is the best. The issue is not yet clear to me. I feel your issue is only in getting authentication.

What you are trying here is a single client accessing two different applications. But you are trying this at the client end. Probably a server to server communication is your solution.

But you need to have a good understanding about the architecture. Your issue is an architecture issue if the two applications don't share a jvm (today and in future).

At the server side you can take parameters and attributes from session and create a URL connection to other server and pass the parameters and attrributes in url. This way you will be exposing the parameters in URL for the get request.

There is a way you can do a post by not exposing the parameters in URL. That is to open a dummy browser at clients end, submit the form to other server and close the boowser. In this approach your parameters will be hidden fields in the form.
 
jiju ka
Ranch Hand
Posts: 308
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator


I am writing a JSP form (called bridge.jsp) to pass the username and password from the E-system to Alfresco DMS through session. The bridge.jsp in locate at the E-Systems application. While I try to retrieve the username and password through the session from Alfresco DMS (using login.jsp), it retrieve NULL value with the same session variable in Alfresco DMS.



Make sure you are debugging the following way
1. You generate and display the bridge.jsp from E-Systems.
2. Then you post the form in bridge.jsp to Alfresco.

In step 2 the synchronization between client browser and 1st session may be broken. Because in step 2 a new session is created for Alfresco. But the input fields in the form should be available in the new request.

I understood that you are checking in the session. Did you check in the request with a request.getParameter("userid") before checking in session?

Probably you are aware that unless you explicitly take the parameters from request and put it in session these parameters are not going to be available in session.
 
Consider Paul's rocket mass heater.
reply
    Bookmark Topic Watch Topic
  • New Topic