Data privacy notice

 

When this content is loaded, usage information is transmitted to Vimeo and may be processed there.

 

             

Servlet action

Modified on Mon, 17 Jul, 2023 at 9:13 AM

IPluginServletAction


Uses

Placement of the servlet plugin in the process chain of formcycle

The plugin is used for servlet-related delivery of own content.


Please note


The plugin servlet implementation is called using the following URL pattern.
http://<Webdomain>/<formcycle-Webapplikation>/plugin/?name=<Name der IPluginServletAction-Implementierung>&client-id=<MandantId>
Instead of the parameter client-id, the parameter project-id can also be specified. If the project-id is specified, the client object necessary for processing is obtained from the determined project object.


Method signatures

The plug-in interface IPluginServletAction references all methods provided by the Base interface IFCPlugin
and additionally the following plugin-specific method signatures:


IPluginServletActionRetVal execute(IPluginServletActionParams params) throws FCPluginException

Transfer values. The IPluginServletActionParams type provides the following properties: 
  • getRequestParameters(): a map with the currently passed request parameters (without uploads). 
  • getUploadFiles(): a map with all uploaded files from the request 
  • getHeaderMap(): a map with the header information from the request 
  • getUser(): the user currently referenced in the session 
  • getSessionAttributeMap(): the parameters currently present in the session 
  • getLocale(): information about the currently set language and region 
  • getFrontend-Server(): reference to the frontend server, if servlet plugin was called via frontend server 
  • getAction(): type of servlet call

Return values: The return value must be of type IPluginServletActionRetVal, a reference implementation is provided by the PluginServletActionRetVal class.The object enables the return of an object of the type IServletResponse, which offers the possibility to deliver a simple string, but also binary data to the browser. By determining the Response type of the IServletResponse object, it is determined how the transferred response data is interpreted or delivered:

Response typeDescription
HTML
The passed Response string is interpreted as finished HTML and delivered to the browser.
SHOW_FILE
The passed data (binary data and Response string) is delivered as a file download to the browser, where the content of the Response string is interpreted as a file name.
 TEMPLATE
A new HTML document is created and the passed Response string is taken as the content of the body element.
TEMPLATE_SYSTEM
Currently identical to TEMPLATE.
REFIT
The passed Response string is interpreted as a URL and a redirect is performed.
If the plugin is processed incorrectly, an FCPluginException is thrown.

Was this article helpful?

That’s Great!

Thank you for your feedback

Sorry! We couldn't be helpful

Thank you for your feedback

Let us know how can we improve this article!

Select at least one of the reasons
CAPTCHA verification is required.

Feedback sent

We appreciate your effort and will try to fix the article