The necessary steps depend on whether you are using Natural under UNIX or another scenario.
To customize the session ID when running under Natural UNIX
Create new Java file under WEB-INF/contexts - we called it "aaa" in this example.
Implement the Java class in this manner:
package contexts; import com.sabratec.applinx.j2ee.framework.web.GXHostLoginContext; import com.sabratec.applinx.framework.*; public class aaa extends GXHostLoginContext { private static final long serialVersionUID = 1L; public void gx_onLoad() { super.gx_onLoad(); } public void doLogin() { super.doLogin(); } @Override public void gx_initSessionConfig() { GXWebAppConfig gx_appConfig = getGXAppConfig(); gx_appConfig.getSessionConfig().setSessionId(getTagsAccesor().getTagContent("GXUser")); gx_appConfig.getSessionConfig().setDescription("desc1"); super.gx_initSessionConfig(); }
Edit the hostLogin.jsp
to use this new Java file, by pointing the gx_page to the new class <gx:page gx_context="contexts.aaa">
.
Use the build script (make.sh) to recompile this class.
Restart Tomcat and try again.
To customize the ApplinX session ID in another (non-Natural/UNIX) scenario
Go to the ApplinX web application folder.
Edit the GXBasicContext.java file.
In the gx_initSessionConfig
method, uncomment the following line:
gx_appConfig.getSessionConfig().setSessionId("<YOUR_SESSION_ID>");
Change <YOUR_SESSION_ID>
to the required value.
Use the build script (make.sh etc) to recompile this class.