That will not work. Both are completely different. A PHP session cannot be recognized by JSP Script or vice-versa.
Below are some indirect ways to achieve the scenario..
Way 1:
An ugly hack would be , write the session variable from PHP page to a file, such that a JSP variable can open the file and read it.
Way 2:
Set the session variable through PHP and pass it through the JSP script as a parameter via querystring.