To open a form that is based on a template, use the setTemplateId method in your servlet or portlet.
Both the servlet version and the portlet version of setTemplateId cause Translator to assign a user session to one of the templates in the Shared File Cache. After the template is assigned to a user session, it becomes a live form instance. Translator then prepares a new form template for the next request.
To open a form that is based on a template:
- Determine the ID of a template to open.
- Call setTemplateId.
In the case of a servlet, call setTemplateId with the servlet HttpServletResponse object and the template ID. In the case of a portlet, call setTemplateId with the portlet RenderRequest object and the template ID.
See the samples that are included with Webform Server.
Parent topic: Setting up form templates
Form templates overview