Using a Variable Specified in the WORP_Login.jsp Within a FOCEXEC on the Server
By Ben Naphtali
A customer recently contacted us wanting to use a variable specified in the WORP_Login.jsp within a FOCEXEC on the server. There is a technique that will accomplish this for the Business Intelligence Dashboard and MRE alike, and although this functionality is documented in the WebFOCUS
Security and Administration guide, it is not clear that it can be applied as the customer was suggesting.
But it is possible, and the necessary steps are outlined in this article.
As an example, let’s say we are going to hard-code a hidden form variable of GROUPID within one of the login pages. Realize that this could be a dropdown list box of some sort, but the point here is to understand how to maintain the persistency of this variable and how it gets to the WebFOCUS reporting
server.
Within the WORP_Login.jsp located in the directory /ibi/WebFOCUS53/webapps/webfocus53/worp/jsp or the logon.htm, which is located in the directory of /ibi/WebFOCUS53/ibi_html/workbnch, you should add the following line after the other hidden variables:
<INPUT TYPE="hidden" NAME="GROUPID" VALUE="Finance">
Since in both of these logon forms there is no WF_SIGNON action, a WF_user cookie is not created that would maintain persistency of the GROUPID variable. To maintain persistency during each connection, we need to copy the value of this variable to a session variable on logon,
and use it on subsequent connections. New site.wfs code (following this paragraph) takes the value of the WebFOCUS variable GROUPID, which will only be sent to WebFOCUS on an MRE or Dashboard logon, and places it in a session variable of the same name. Every subsequent connection for that
user will take the value of the session variable GROUPID and place it in to the WebFOCUS variable so it can be passed to the server.
<VER 1>
# place any variables here from cgivars.wfs that
you wish to override.
_HTML_COMMENT_VAR=CGI gened on &_cgi_gen_var\n
<SET> GROUPID(PASS)
<if> IBIMR_action EQ "MR_SIGNON" AND
IBIMR_user.upper NE "PUBLIC"
#place GROUPID into session
sessionvar=GROUPID
<call> CopyWFVarToSessionVar(GROUPID,sessionvar)
<endif>
wfvar=GROUPID
sessionvar=GROUPID
<call> CopySessionVarToWFVar(sessionvar,wfvar)
If the change is made for WORP_LOGIN.jsp and you are deploying the webfocus53.war file, as opposed to the open directory, you will need to recreate the webfocus53.war file and redeploy the Web application.
To recreate the .war file, follow these steps:
- Back up the production
/ibi/WebFOCUS53/webapps/webfocus53.war file (i.e., webfocus53.war.org).
- Re-archive your updated Web application:
- Change to the webfocus53 directory: cd/ibi/WebFOCUS53/webapps/webfocus53
- Issue the
jar command from a comand prompt (jar must be in your path): jar -cvf /ibi/WebFOCUS53/webapps/webfocus53.war . (Note: The space and period after the jar command are important.)
- Then redeploy the
webfocus53 Web application.
The FOCEXEC on the server would just reference a variable of &GROUPID. If you are running this within MRE, you will need to turn off auto prompting. With that out of the way, you are done.

|