4 Replies - 4999 Views - Last Post: 12 December 2008 - 10:51 PM Rate Topic: -----

#1 php2sheik  Icon User is offline

  • New D.I.C Head

Reputation: 0
  • View blog
  • Posts: 6
  • Joined: 11-December 08

how to pass data from java page to php page

Post icon  Posted 11 December 2008 - 05:30 AM

hai

i want to send some data from java page to php page. in our devloping website login page is in java page. i devloped reports in php page. i want to maintain session in php page who logged using java login page.. i don't want to load the php page, if not properly login in java page.. then how can i maintain the user session.. is there any way to expire the session state..
Is This A Good Question/Topic? 0
  • +

Replies To: how to pass data from java page to php page

#2 lordms12  Icon User is offline

  • D.I.C Regular
  • member icon

Reputation: 30
  • View blog
  • Posts: 339
  • Joined: 16-February 08

Re: how to pass data from java page to php page

Posted 11 December 2008 - 07:05 AM

I do not think I get your problem well but you can expire sessions in J2EE by
HttpSession session = request.getSession();
session.invalidate();

This post has been edited by lordms12: 11 December 2008 - 07:07 AM

Was This Post Helpful? 0
  • +
  • -

#3 akozlik  Icon User is offline

  • D.I.C Addict
  • member icon

Reputation: 90
  • View blog
  • Posts: 797
  • Joined: 25-February 08

Re: how to pass data from java page to php page

Posted 11 December 2008 - 02:53 PM

I'm not sure that sessions can be shared between Java and PHP because I have no tried it. However, you want to try using a shared cookie between the two. That may work.

You might want to consider only hosting the session using one of the languages, most likely your Java Servlet. Use the PHP for the scripting side. You can also pass variables between the two using POST and GET methods.
Was This Post Helpful? 0
  • +
  • -

#4 lordms12  Icon User is offline

  • D.I.C Regular
  • member icon

Reputation: 30
  • View blog
  • Posts: 339
  • Joined: 16-February 08

Re: how to pass data from java page to php page

Posted 11 December 2008 - 05:23 PM

View Postakozlik, on 12 Dec, 2008 - 12:53 AM, said:

I'm not sure that sessions can be shared between Java and PHP because I have no tried it. However, you want to try using a shared cookie between the two. That may work.

You might want to consider only hosting the session using one of the languages, most likely your Java Servlet. Use the PHP for the scripting side. You can also pass variables between the two using POST and GET methods.


Session is not related to language so it is sharable.
Was This Post Helpful? 0
  • +
  • -

#5 php2sheik  Icon User is offline

  • New D.I.C Head

Reputation: 0
  • View blog
  • Posts: 6
  • Joined: 11-December 08

Re: how to pass data from java page to php page

Posted 12 December 2008 - 10:51 PM

View Postakozlik, on 11 Dec, 2008 - 01:53 PM, said:

I'm not sure that sessions can be shared between Java and PHP because I have no tried it. However, you want to try using a shared cookie between the two. That may work.

You might want to consider only hosting the session using one of the languages, most likely your Java Servlet. Use the PHP for the scripting side. You can also pass variables between the two using POST and GET methods.



hi akozlik,


how can i use shared cookie between java page and php page? Using cookies how can i maintain session... then is same cookie value is passed from java page to php page?
Was This Post Helpful? 0
  • +
  • -

Page 1 of 1