Solved

combine PHP and JSP

Posted on 2002-06-02
6
553 Views
Last Modified: 2010-05-18
Hi All,

My web site is made up by PHP and jsp.  They use different sessions.  Therefore is there any method that can integrate them such that they use the same session?

Thanks a lot!

regards,
dp
0
Comment
Question by:d_p2
  • 3
  • 3
6 Comments
 
LVL 19

Accepted Solution

by:
cheekycj earned 100 total points
ID: 7051230
There are probably many approaches to this but the ones that I know of are:

1.  Make your Session DB driven.  So you store all your session data in a DB (some application servers support this just via a config change) and then you set the JSP session id in the cookie.  PHP will read this session ID and access and write session data to the corresponding row in the session data base.

2.  use a flat file structure for the above.

HTH,
CJ
0
 

Author Comment

by:d_p2
ID: 7053417
hm... what if i have a load balancer and 2 web servers?  How can i guarantee the unique session id?

Thanks a lot!

regards,
dp
0
 
LVL 19

Expert Comment

by:cheekycj
ID: 7053613
You would have to separate your DB to a separate server so both webservers will use it.  And to uniquely gauruntee the session id use apache's session id generator or use your own algorithm that will incorporate the server name/id in it..

CJ
0
Free Tool: SSL Checker

Scans your site and returns information about your SSL implementation and certificate. Helpful for debugging and validating your SSL configuration.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

 

Author Comment

by:d_p2
ID: 7054322
CJ,

Great!
Thanks a lot!

regards,
dp
0
 
LVL 19

Expert Comment

by:cheekycj
ID: 7054328
Glad I could help, thanx for the "A"

CJ
0
 

Author Comment

by:d_p2
ID: 7058133
Welcome ^_^
0

Featured Post

Announcing the Most Valuable Experts of 2016

MVEs are more concerned with the satisfaction of those they help than with the considerable points they can earn. They are the types of people you feel privileged to call colleagues. Join us in honoring this amazing group of Experts.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

The business world is becoming increasingly integrated with tech. It’s not just for a select few anymore — but what about if you have a small business? It may be easier than you think to integrate technology into your small business, and it’s likely…
Most MSPs worth their salt are already offering cybersecurity to their customers. But cybersecurity as a service is wide encompassing and can mean many things.  So where are MSPs falling in this spectrum?
This video shows how to use Hyena, from SystemTools Software, to bulk import 100 user accounts from an external text file. View in 1080p for best video quality.

808 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question