This is intended for use as a starting point for forms and servlet development. This is an improvement on the stripped bare Lotus Forms Webform Server framework servlet
. The only thing that has been added here is the functionality for this servlet to accept an XFDL submission. It would be a great starting point for developing a Lotus Forms servlet with some custom functionality. It is also intended as a learning tool if you want to see what is the absolute minimum code required for a Lotus Forms enabled servlet.
This servlet contains an XFDL form in the WEB-INF directory, which is loaded on the translator server located at localhost (same host machine that is running the application server) when the servlet is run.
This sample requires that you have a version of Webform Server and Websphere Application Server installed.
- From Eclipse or Rational Application Developer, import the project interchange file (.zip).
- The Webform Server framework libraries are not included, you will need to copy them into the lib directory for the servlet to work (this is done so that the servlet is ready for use with any version you have of WFS and also to avoid any potential licensing/legal issues with distributing the framework libraries on this wiki). Follow these steps to install the libraries:
1. Locate the libraries in the Webform server installation directory. These are located in the webform server installation directory in the redist directory. For example, if you used the default installation path, they would be located at: C:\Program Files\IBM\Lotus Forms\Server\3.5\Webform Server\redist
2. Locate the lib directory of your Base Forms Servlet project. In Eclipse or RAD this will be (workspace dir)\BaseFormsServlet\WebContent\WEB-INF\lib
3. Copy the entire contents of the redist directory to the lib directory (you don't actually need the .js files, but they don't do any harm)
4. Rebuild your Eclipse project.
Deploying to WAS
1. In eclipse or RAD, right click on your servlet project and select "Export..."
2. Under the Web category, select "WAR file"
3. Provide a destination directory and note it for later.
4. Click finish to complete the wizard, thereby generating the WAR file.
5. Login to your websphere application server admin console with an administrator account.
6. Go to the Administration page and select Applications > Install New Application
7. Click the install button.
8. Locate your WAR file on disk and upload it (note that you should not install servlets onto the translator server, instead install them on a different server. The default is named server1).
- The Lotus Forms API is not used in this example. If you add any code to the servlet which leverages the Lotus Forms API, you need to make sure the API is installed on your application server or put the StreamingAPI.jar in the lib directory of your project.
- If your webform server translator is located on a different host than your Websphere Application server, you need to modify the web.xml file and change "localhost" to the hostname of your translator server.