Still celebrating National IT Professionals Day with 3 months of free Premium Membership. Use Code ITDAY17

x
?
Solved

combine PHP and JSP

Posted on 2002-06-02
6
Medium Priority
?
562 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 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
Industry Leaders: 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

Concerto's Cloud Advisory Services

Want to avoid the missteps to gaining all the benefits of the cloud? Learn more about the different assessment options from our Cloud Advisory team.

Question has a verified solution.

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

The online market is growing at an unprecedented rate and retail eCommerce sales are expected to reach $4 trillion by 2020. Yet, the profit is not just there for the taking because you have to set yourself apart from the competition.
What we learned in Webroot's webinar on multi-vector protection.
In this brief tutorial Pawel from AdRem Software explains how you can quickly find out which services are running on your network, or what are the IP addresses of servers responsible for each service. Software used is freeware NetCrunch Tools (https…
This is my first video review of Microsoft Bookings, I will be doing a part two with a bit more information, but wanted to get this out to you folks.

688 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