Interaction URL

The Interaction URL field is on the first page of the Web Interaction wizard, Specify a Name and Location for your Web Interaction only when you restart the wizard to modify an interaction that has been previously created.

The field is read-only, and it contains the URL information that was generated when the interaction was first created. You can use this URL information to invoke an interaction directly in your JavaScript code by calling the action class and setting the required input parameter data in the URL. The action class will then perform the interaction and display the result page. This is especially useful if you do not want to invoke an interaction from an input JSP page, but want to display the result JSP page in a browser.

The format of the interaction URL is:

interaction_name.do?field1=#1&field2=#2...&_witreq=1

where interaction_name is the name of the Web interaction. The ? character indicates the beginning of the parameters, which are in name and value pairs, such as field1=#1. The numbers preceded by the # character, such as #1, #2, are included in the URL to indicate that they are replaced with the data from the corresponding parameter. The & character separates the parameters. The _witreq=1 parameter ends the URL, and it is used to indicate that the request is from outside of the Web application.

For example, if your Web interaction name is cust with parameter names custna (for customer name), caddr (for customer address), and cphone, (for customer phone number), the interaction URL appears as:
custServlet.do?custna=#1&caddr=#2&cphone=#3&_witreq=1
The interaction URL shows you the action to invoke as well as the parameters it expects. For example, you could have the following link on a page:
<a href="custServlet.do?custNa=Joe&cAddr=Main%20St&cPhone=555-1212&_witreq=1">Show Joe Info</a>
to display information about the customer name, address, and phone number that you specified.