Focal Point
TECHNIQUE Needed: Query servlet string and put into a variable

This topic can be found at:
https://forums.informationbuilders.com/eve/forums/a/tpc/f/7971057331/m/429107145

October 06, 2010, 01:29 PM
Rhonda
TECHNIQUE 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.


WebFOCUS & ReportCaster 8.1.05, 7.7.03 - AIX/LINUX, FOCUS 7.6.13 MVS, Output PDF, XLS-XLSX, DOCX and HTML
October 06, 2010, 02:45 PM
GamP
There 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.


GamP

- Using AS 8.2.01 on Windows 10 - IE11.
in Focus since 1988
October 06, 2010, 02:51 PM
dhagen
I 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.


"There is no limit to what you can achieve ... if you don’t care who gets the credit." Roger Abbott
October 06, 2010, 02:52 PM
Francis Mariani
Further 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
Rhonda
Thank you all for your suggestions - use relative pathing
"src=/approot/mapps/companylogo.gif"
We are testing....


WebFOCUS & ReportCaster 8.1.05, 7.7.03 - AIX/LINUX, FOCUS 7.6.13 MVS, Output PDF, XLS-XLSX, DOCX and HTML