aspose file tools*
The moose likes Servlets and the fly likes Maintaining User Sessions between 2 web applications using different technologies Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of The Java EE 7 Tutorial Volume 1 or Volume 2 this week in the Java EE forum
or jQuery UI in Action in the JavaScript forum!
JavaRanch » Java Forums » Java » Servlets
Bookmark "Maintaining User Sessions between 2 web applications using different technologies" Watch "Maintaining User Sessions between 2 web applications using different technologies" New topic
Author

Maintaining User Sessions between 2 web applications using different technologies

Desai Sandeep
Ranch Hand

Joined: Apr 02, 2001
Posts: 1157
Hi,
Can I maintain user sessions in two different web applications using different technologies say JSP and ASP?
Thanks in advance
Regards,
Sandeep

------------------
Sandeep Desai
vgdesai@bom3.vsnl.net.in

  1. Sun Certified Java Programmer Scored 93 per cent
  2. Oracle JDeveloper Rel. 3.0 - Develop Database Applications with Java Scored 56 out of 59
  3. IBM Enterprise Connectivity with J2EE Scored 72 per cent
  4. Enterprise Development on the Oracle Internet Platform Scored 44 out of 56


<b>Sandeep</b> <br /> <br /><b>Sun Certified Programmer for Java 2 Platform</b><br /> <br /><b>Oracle Certified Solution Developer - JDeveloper</b><br /><b>-- Oracle JDeveloper Rel. 3.0 - Develop Database Applications with Java </b><br /><b>-- Object-Oriented Analysis and Design with UML</b><br /> <br /><b>Oracle Certified Enterprise Developer - Oracle Internet Platform</b><br /><b>-- Enterprise Connectivity with J2EE </b><br /><b>-- Enterprise Development on the Oracle Internet Platform </b>
Andrew Shafer
Ranch Hand

Joined: Jan 19, 2001
Posts: 338

All session tracking is doing is passing some arbitrary value along with each request, either as a cookie or by appending the URL. (You could even pass it as a POST if you wanted)
I don't know specifics about ASP session tracking but I'm certain ASP has the ability to read cookies, and handle GET/POST requests. (cookies might be a problem if you have multiple domains involved)
You just need to come up with a scheme that can pass the necessary info back and forth using these requests. You probably need at one value pair as an identifier and then maybe some others to pass along priviledges and/or preferences for the user.
Assuming sessions work close to the same on ASP, you would essentially have two sessions, one in each environment, with a scheme to let each other know what is going on with the other using http requests.
The specifics, of course, depend on your application.


!_I_Know_Kung_Fu_!
Desai Sandeep
Ranch Hand

Joined: Apr 02, 2001
Posts: 1157
Hi Andrew,
Thank you for the response.
You are right, Cookies is certainly one way by which almost all the web applications can maintain/understand the User Sessions.
But in case, cookies has been turned off (we really cannot depend on cookies only solution!!), and assuming that we donot have to be dependent heavily on the URL rewriting technique, can we some how make 2 different User sessions understand each other, if they are using different technologies?
For instance, I have a 2 web applications (one in ASP and another in JSP), if I log on using a JSP web Application, I would require users using the ASP web application to understand that the user with a given user-id has been already logged on and he should not be allowed access!
I hope, all this is not very confusing
Thanks once again for your views.
Regards,
Sandeep Desai
vgdesai@bom3.vsnl.net.in

  1. Sun Certified Java Programmer Scored 93 per cent
  2. Oracle JDeveloper Rel. 3.0 - Develop Database Applications with Java Scored 56 out of 59
  3. IBM Enterprise Connectivity with J2EE Scored 72 per cent
  4. Enterprise Development on the Oracle Internet Platform Scored 44 out of 56

  5. [This message has been edited by Desai Sandeep (edited April 26, 2001).]
Andrew Shafer
Ranch Hand

Joined: Jan 19, 2001
Posts: 338

People can either learn techniques or the principle behind the technique.
If you just have techniques without the underlying principles you cannot adapt to situational variance.
I didn't say anything about using cookies or rewriting URLs, those are techniques. The principle is passing the information back and forth.
That is how sessions are tracked, a string gets assigned to the client and then this is passed back and forth between the server and the client.
An option with no URL rewriting, have your applications generate hidden form fields and post this string with each request.
It all depends on what you want/need to do. Are you developing two seperate applications with two seperate logins? Or is the login mechanism in just JSP (or ASP) and this needs to make requests to the ASP (or whatever) part.
If you have two seperate logins (God only knows why you need to do this), then I think it is best to have a third application that the other two reference to track the session. I'm no expert on ASP (or anything else for that matter) but I think I read that you can create activeX controls with Java or interact with beans from VB so there should be a way. If all else fails you could always use sockets to communicate. There might also be some slick CORBA/RMI answer.
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Maintaining User Sessions between 2 web applications using different technologies