October 06, 2010, 01:29 PM
RhondaTECHNIQUE Needed: Query servlet string and put into a variable
Does anyone have a technique for querying a servlet string and putting a part of it into a variable?
We have 4 environments, each URL is slightly different:
DEV - webfocus7dv6.company.com
TEST - webfocus7tv6.company.com
MODEL - webfocus7mv6.company.com
PROD - webfocus7dv6.company.com
We need to be able to query the string, break it up and use it in the FOCEXEC. Right now we have to hard code it for each of the environments which is not the way to do it.
src=http://webfocus.
7dv6.company.com/ibi/apps/mapps/companylogo.gif>'
We are using websphere and the reporting server is on MVS and the client is on AIX if that matters. We are using 7.1.7 WebFOCUS.
Thanks for any suggestions.
October 06, 2010, 02:45 PM
GamPThere exists a standard http header variable, that should always be available:
Referer - This is the address of the previous web page from which a link to the currently requested page was followed.
Also in WebFOCUS there must be a variable that contains this linked-from value. Search the forum for the term 'Referer' and maybe your answer is just there for the taking.
October 06, 2010, 02:51 PM
dhagenI cannot verify 7.1, but in 7.7 there is a WF Script parameter called SERVER_NAME. Add
<set> SERVER_NAME(pass)
to your custom settings via the WF client admin, then that should do the trick.
October 06, 2010, 02:52 PM
Francis MarianiFurther to GamP's suggestion, if you add this to the "Custom Settings" in the Admin Console, you should be able to use the generated Dialogue Manager variable in for FOCEXEC:
# Indicates the URL of the referring Web page
<SET> HTTP_REFERER = &HTTP_REFERER (pass)
You can also add this:
# Server's host name or IP address
<SET> SERVER_NAME = &SERVER_NAME (pass)
These commands will create Dialogue Manager variables: &HTTP_REFERER AND &SERVER_NAME.
Francis
Give me code, or give me retirement. In FOCUS since 1991
Production: WF 7.7.05M, Dev Studio, BID, MRE, WebSphere, DB2 / Test: WF 8.1.05M, App Studio, BI Portal, Report Caster, jQuery, HighCharts, Apache Tomcat, MS SQL Server
October 07, 2010, 10:13 AM
RhondaThank you all for your suggestions - use relative pathing
"src=/approot/mapps/companylogo.gif"
We are testing....