Configuring a web file server on Windows
Install and configure a web file server on Windows for serving files to some components.
About this task
Procedure
- Log on as the ibmadmin user.
- In Eclipse, to create a simple web project, click File > New and select Web Project.
- In the New Web Project window, enter a name for the web project, and select the option to use the Java Enterprise Edition programming model. Click Next.
- Select WebSphere Application Server Liberty Profile for the target runtime.
- If you want to bundle files such as templates with other extensions, choose to add the project to an EAR file that contains multiple web archive (WAR) files. Otherwise, the files will be deployed as a single WAR file.
- Specify the Web Module Context root. Ensure that the appropriate version of the module feature is added to server.xml.
- Click Finish.
- Copy the files that you want to serve to project_directory/WebContent, where project_directory is the name of the web project that you created in step 1.
- Right-click the project in Eclipse and export the project to a WAR file, for example, NotificationTemplates.war. Enter a name for the WAR file to export.
- Copy the WAR file to liberty_installation/usr/servers/defaultServer/apps/,
where liberty_installation is the path to WebSphere® Application Server Liberty Profile that IBM Intelligent Operations Center is deployed on. For example, the WebSphere Application Server Liberty Profile path for IBM Intelligent Operations Center is /opt/IBM/wlp/ on
the application server. Alternatively, export the WAR file to the
following directory:
C:\home\ibmadmin\liberty\usr\servers\defaultServer\apps - Add the following line to the liberty_installation/user/servers/defaultServer/server.xml file.
For example, if you exported the project to a WAR file named NotificationTemplates.war, add the following line:<webApplication location="my_war_file.war"/><webApplication location="NotificationTemplates.war"/> - Save the server.xml file. WebSphere Application Server Liberty Profile automatically updates the application.
- Check that you can access your files by using the context root and file name that you specified.