Previous Topic: Collect Additional Attributes

Next Topic: Tell Users Why Login Failed

Include Header Values in the FCC Namespace

As described in Generate Name/Value Pair in FCC Files, the FCC name space can include headers. To use a header in a name space, you must use the @smheaders directive in order to copy the headers into the name space. If you do not include a header name in @smheaders, it will not be available in the name space.

For example, if you want to retrieve the HTTP headers called HEADER1 and HEADER2, and put them into hidden form fields in your FCC, you the following must appear in the FCC:

@smheaders=HEADER1:HEADER2
<input type="hidden" name="HEADER1" value="$$HEADER1$$">
<input type="hidden" name="HEADER2" value="$$HEADER2$$">

Without the @smheaders directive the output (as seen in your web browser) would be:

<input type="hidden" name="HEADER1" value="">
<input type="hidden" name="HEADER2" value="">

When you add the @smheaders directive as described above, the output is:

<input type="hidden" name="HEADER1" value="Contents of header HEADER1">
<input type="hidden" name="HEADER2" value="Contents of header HEADER2">

The following are example JSP/ASP examples for assigning the header values to hidden form fields:

%<key_name>%  == request.getheader() or request.ServerVariables() $$<key_name>$$ == request.getParameter() or request.QueryString()

For example, to assign the value of a header, "HEADER1" to a hidden FCC form field:

<input type=hidden name=HEADER1 value=%HEADER1%>

To get the same value from the query-string:

<input type=hidden name=HEADER1 value=$$HEADER1QueryStringParam$$>