Solved

combine PHP and JSP

Posted on 2002-06-02
6
549 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
How your wiki can always stay up-to-date

Quip doubles as a “living” wiki and a project management tool that evolves with your organization. As you finish projects in Quip, the work remains, easily accessible to all team members, new and old.
- Increase transparency
- Onboard new hires faster
- Access from mobile/offline

 

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

How your wiki can always stay up-to-date

Quip doubles as a “living” wiki and a project management tool that evolves with your organization. As you finish projects in Quip, the work remains, easily accessible to all team members, new and old.
- Increase transparency
- Onboard new hires faster
- Access from mobile/offline

Join & Write a Comment

A safe way to clean winsxs folder from your windows server 2008 R2 editions
A Short Story about the Best File Recovery Software – Acronis True Image 2017
This video gives you a great overview about bandwidth monitoring with SNMP and WMI with our network monitoring solution PRTG Network Monitor (https://www.paessler.com/prtg). If you're looking for how to monitor bandwidth using netflow or packet s…
This video explains how to create simple products associated to Magento configurable product and offers fast way of their generation with Store Manager for Magento tool.

757 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

Need Help in Real-Time?

Connect with top rated Experts

20 Experts available now in Live!

Get 1:1 Help Now