Is it possible to read data from this session-variable directly from the java-applet?
It is possible to put a PHP variable in a piece of javascript (providing the script is visible in the HTML) because PHP is executed before Java is started
But, you cannot send Javascript variables to PHP