The client browser has a session with the JSF server. This has a unique JSESSIONID cookie.
The OraFormsFaces applet that runs within the page does not have a session with the JSF server. It does have a session with the Java container running the Forms Server, but this is a separate server with another JSESSIONID.
You can get a hold of the JSF JSESSIONID cookie from JavaScript. Since OraFormsFaces also enables you to run JavaScript from PL/SQL you can do something like this:
- Code: Select all
v_cookies := offJavaScript.jsEval('document.cookie');
This will get the document cookies from the browser which should contain the JSESSIONID of the JSF server session. Be aware that newer versions of WebLogic will include the JSESSIONID cookie with the "httponly" flag set meaning it will not be available from JavaScript. However, you can specify not to use the httponly flag in the weblogic.xml:
- Code: Select all
<session-descriptor>
<cookie-http-only>false</cookie-http-only>
</session-descriptor>