To maintain the session identity, each HTML response page can return the session ID in a form field.
The most usual way to do this is to have the JSP insert all the required fields, including the session identifier, into the HTML page. Add the following scriptlet code on the JSP page.
<%= utb.getRequiredHtmlFields() %>
Alternatively, you can use the portlet JSPTags, which use the JspContextServices interface internally with the same purpose.
As a third way, perform the following steps to respond with only the session ID in a form field:
For example, in a JSP file, use the following sample code to insert the hidden session ID field on the HTML page:
<jsp:useBean id="utb" scope="page" class=" com.ibm.btt.portal.base.PortletJspContextServices "/> <% String dse_sessionId = (String)utb.getSessionId; out.println ("<input type=hidden name=sessionId value=\""+dse_sessionId+"\">"); %>