Obtaining information about the user and the session
Typically, new Actuate Java Component web pages need access to session information. Your application server and Java Component store information about the session that you can use in your web pages. You can obtain the serverURL, volume, and other information from your application server, as shown in the following example. The volume parameter returns the name of the machine that hosts the application server and the serverURL parameter returns an empty string.
String volume = request.getParameter("volume");
String serverURL = request.getParameter("serverurl");
String userId = request.getParameter("userid");
String password = request.getParameter("password");
String roxReport = request.getParameter("report");
You also can obtain the context root path from your application server, as shown in the following code:
String contextRoot = request.getContextPath();
Actuate Java Component stores a wide variety of information about the session in UserInfoBean. To access UserInfoBean, place the following line of code near the top of your JSP:
<jsp:useBean id="UserInfoBean" class="com.actuate.activeportal.beans.UserInfoBean"scope="session"/>
After this line, you can access information in the JavaBean by the appropriate get method. The most important method for new pages is the getIportalid( ) method. This method retrieves the user’s authentication ID with the server. This ID is based on the user name only.
To write generic code, you need to determine whether your application is running. Java Component includes a utility class, iPortalRepository, that provides this information. To access this class in your JSP, place the following code at the head of your JSP:
<%@ page
You can then use code similar to the following line to check the repository type:
boolean isEnterprise =iPortalRepository.REPOSITORY_ENCYCLOPEDIA.equalsIgnoreCase(UserInfoBean.getRepositoryType());
You can then use the authentication ID and the repository type to access the server with JSP custom Actuate tags and calls to Java Component beans, as shown in the following examples:
String authenticationID = UserInfoBean.getIportalid();
String folderPath = UserInfoBean.getCurrentfolder();
jobDetailURL += StaticFuncs.encode(UserInfoBean.getUserid());
com.actuate.reportcast.utils.AcLocale acLocale =UserInfoBean.getAcLocale();
TimeZone timeZone = UserInfoBean.getTimezone();boolean isEnterprise =iPortalRepository.REPOSITORY_ENCYCLOPEDIA.equalsIgnoreCase(UserInfoBean.getRepositoryType());
String serverURL = ( isEnterprise | UserInfoBean.getServerurl() | "" );
String userVolume = ( isEnterprise | UserInfoBean.getVolume() | "" );

Additional Links:

Copyright Actuate Corporation 2012