Execute Server-sided scripts and Web Services

The scripts marked to run on the server are known as server-sided scripts. The following table lists all the parameters used in Server-sided scripts and Web Services.

ParameterDescription
activityActivity contains the events that trigger the request. Such as click, exit or change
contextSomcontextSom contains SOM expression of the object where events are executed.
TemplateTemplate contains the template used to render the form.
contentRootcontentRoot contains the template root directory used to render the form.
DataData contains bata bytes used to render the form.
formDomformDom contains DOM of the HTML5 form in JSON format.
packetpacket is specified as form.
debugDirdebugDir contains the debug directory used to render the form.

Submit data

On clicking the submit button, HTML5 forms send data to the server. The following table lists all the parameters that HTML5 forms send to server.

ParameterDescription
TemplateTemplate used to render the form.
contentRoottemplate root directory used to render the form.
Databata bytes used to render the form.
formDomDOM of the HTML5 form in JSON format.
submiturlThe URL where data XML is posted.
debugDirThe debug directory used to render the form.

How the submit proxy works?

The submit service proxy acts as a pass through if the submiturl is not present in the request parameter. It acts as a pass-through. It sends the request to the /bin/xfaforms/submitaction end point and sends the response to the XFA runtime.

The submit service proxy selects a topology if the submiturl is present in the request parameter.

  • If AEM servers post the data, proxy service acts as a pass-through. It sends the request to the /bin/xfaforms/submitaction end point and sends the response to the XFA runtime.

  • If proxy posts the data, the proxy service passes all the parameters except submitUrl to the /bin/xfaforms/submitaction end point and receives xml bytes in response stream. Then, the proxy service posts the data xml bytes to the submitUrl for processing.

  • Before sending data (POST request) to a server, HTML5 forms verify connectivity and availability of the server. To verify connectivity and availability, HTML forms send an empty head request to the server. If the server is available, HTML5 form sends data (POST request) to the server. If the server is not available, an error message, Could’t connect to the server, is displayed. The advance detection prevents users from the hassle of refilling the form. The proxy servlet handles head request and does not throw exception.

Experience Manager


Espressos & Experience Manager: AEM Forms

Espressos & Experience Manager

Thursday, Mar 6, 7:00 PM UTC

Join Adobe's AEM product team as they highlight AEM Forms' latest innovations, including: the new Gen AI Assistant, Unified Composition with AEM Sites, and new ways to deploy forms through conversations.

Register

Connect with Experience League at Summit!

Get front-row access to top sessions, hands-on activities, and networking—wherever you are!

Learn more