Questionnaire URLs |
All functionality of the ViewsFlash application is accessed using a set of stable and predictable URLs, described in this section.
Every URL includes protocol, domain, port, context, servlet and query string parameters.
Example: http://yourhost.com/ViewsFlash/servlet/viewsflash?cmd=page&pollid=Examples!car_purchase
Protocol, domain, and port
Protocol. Usually, questionnaires use http:// (not secure) protocol. The Security page can require the use of https:// instead. Some organizations deploy ViewsFlash, usually with a proxy server, so that all requests to the application must use https.
Domain. Always use the fully qualified domain name of the server where ViewsFlash is deployed. Avoid using IP addresses, localhost, and intranet names that omit the fully qualified domain name. The reason for this is that under those conditions it is often the case that sessions and cookies (which can be used with ViewsFlash for authentication by requesting their use explicitly) do not work properly.
Port. The application server usually uses the default ports (80 for http:// and 443 for https:// ) for access to the server and in those cases it is not necessary to specify the port. It is possible to deploy ViewsFlash on any port, and when doing so, include the port in the URL, such as .../yourcompany.com:8080
Web Services API commands are usually configured to use a port other than 80 and therefore must include the port.
Context
The ViewsFlash application is normally deployed as /ViewsFlash, although this is not a requirement and any name can be used. In older versions of WebSphere Portal, the VIewsFlash application is deployed at an unpredictable context, such as /wps/PA_134ukf04.
The servlet
Following the Context, there are three servlets used in VIewsFlash:
/servlet/vfadmin is used for the ViewsFlash administrative user interface when application security is enabled.It requires that the user sign on to the application server.
/servlet/viewsflash is used for questionnaires and for the Web Sevices API.
/servlet/vfauth is used for questionnaires that choose "Basic" authentication in their Security settings. See also application security.
In summary, the following are the most common URLs used by ViewsFlash with standard out of the box settings:
http://www.yourcompany.com/ViewsFlash/servlet/viewsflash
http://www.yourcompany.com/ViewsFlash/servlet/vfadmin
http://www.yourcompany.com/ViewsFlash/servlet/vfauth
Displaying a questionnaire
To display a questionnaire in the browser, use these parameters:
?cmd=page&pollid=[/pollid]
This same URL is used to resume entering data into a questionnaire that is in progress after the user presses the Save button.
Specifying the questionnaire's ID
When displaying a new questionnaire for the first time, depending on the authentication method used, the standard URL automatically creates the questionnaire ID.
When resuming a questionnaire after a Save, the ID must be preset using the authentication method used by the questionnaire questionnaire, such as setting a session attribute.
When a questionnaire's authentication method is Question with a generic field, add this parameter to the URL, replacing XXXXX with the questionnaire's ID:
&vwfqueryauthenticateduserid=XXXXX
When the method is Question with a specific question, such as "formid", use the question name instead:
&formid=XXXXX
Predefined tags for URLs
When constructing URLs in a questionnaire, the following predefined tags are used to refer to information about the questionnaire where they are used:
[/webappname] usually becomes /ViewsFlash, the application Context. In WebSphere Portal's older versions, the name is not predictable and this tag is the only way to get the context reliably.
[/pollid] becomes place!questionnaire, the standard way to reference to a questionnaire that combines its Place and its Name.
[/authenticateduserid] can be used with &vwfqueryauthenticateduserid= (see above) to refer to the ID of the questionnaire that is being filled out currently.
Printing and Viewing a questionnaire
To print or view a questionnare in progress, before its last page is submitted, use this URI:
[/webappname]/servlet/viewsflash?cmd=page&pollid=[/pollid]&showallquestions=yes
This will display all data entered into the questionnaire as a single page in the browser. When it is printed, each page will be printed on its own piece of paper.
In a portal using Portlet authentication, use this URL instead:
[/webappname]/Router.jsp?cmd=page&pollid=[/pollid]&showallquestions=yes
It is possible to print and view the data in a response after it has been submitted. The Data Review and Modification API must
be enabled, the ID of the questionnaire must be set, and the Security page must allow reviewing data by the Visitor.
When all these conditions are met, use a URL like this:
[/webappname]?cmd=reviewdata&pollid=[/pollid]&review_uniqueid=XXXXXXX
It is possible to display the data in a questionnaire, using both cmd=page and cmd=reviewdata, with all fields disabled. Add this parameter to the URL:
&vwfdisableall=yes