• 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
  • Liutauras Vilda
  • Jeanne Boyarsky
  • paul wheaton
Sheriffs:
  • Ron McLeod
  • Devaka Cooray
  • Henry Wong
Saloon Keepers:
  • Tim Holloway
  • Stephan van Hulst
  • Carey Brown
  • Tim Moores
  • Mikalai Zaikin
Bartenders:
  • Frits Walraven

Maintaining User Sessions between 2 web applications using different technologies

 
Ranch Hand
Posts: 1157
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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
 
Ranch Hand
Posts: 338
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

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.
 
Desai Sandeep
Ranch Hand
Posts: 1157
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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
Posts: 338
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

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.
 
There’s no place like 127.0.0.1. But I'll always remember this tiny ad:
Gift giving made easy with the permaculture playing cards
https://coderanch.com/t/777758/Gift-giving-easy-permaculture-playing
reply
    Bookmark Topic Watch Topic
  • New Topic