Solved

combine PHP and JSP

Posted on 2002-06-02
6
550 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
Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

 

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

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

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

We need a new way to communicate time sensitive or critical info.   The best part of my role at xMatters is visiting our clients all over the world to learn about how they operate their businesses, share insights that xMatters has gleaned across…
Some code to ensure data integrity when using macros within Excel. Also included code that helps secure your data within an Excel workbook.
This Micro Tutorial will teach you how to censor certain areas of your screen. The example in this video will show a little boy's face being blurred. This will be demonstrated using Adobe Premiere Pro CS6.
This Micro Tutorial hows how you can integrate  Mac OSX to a Windows Active Directory Domain. Apple has made it easy to allow users to bind their macs to a windows domain with relative ease. The following video show how to bind OSX Mavericks to …

910 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

16 Experts available now in Live!

Get 1:1 Help Now