Go Premium for a chance to win a PS4. Enter to Win

x
?
Solved

combine PHP and JSP

Posted on 2002-06-02
6
Medium Priority
?
565 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 400 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
Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

 

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

Important Lessons on Recovering from Petya

In their most recent webinar, Skyport Systems explores ways to isolate and protect critical databases to keep the core of your company safe from harm.

Question has a verified solution.

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

Your business may be under attack from a silent enemy that is hard to detect. It works stealthily in the shadows to access and exploit your critical business information, sensitive confidential data and intellectual property, for commercial gain. T…
In this article, the configuration steps in Zabbix to monitor devices via SNMP will be discussed with some real examples on Cisco Router/Switch, Catalyst Switch, NAS Synology device.
This video shows how to quickly and easily deploy an email signature for all users in Office 365 and prevent it from being added to replies and forwards. (the resulting signature is applied on the server level in Exchange Online) The email signat…
Want to learn how to record your desktop screen without having to use an outside camera. Click on this video and learn how to use the cool google extension called "Screencastify"! Step 1: Open a new google tab Step 2: Go to the left hand upper corn…

824 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