Updating configuration files
After you have installed the integrated Xsockets tool, you must complete manual changes to several configuration files for the instance.
You need to update these files: the WAR file, the web.xml file, and the
httpd.conf file.
-
Copy the WAR file
From a command line, enter this command:
where XXXX is the library name you created during Xsockets configuration and <server_name> is the name of the server instance you created during Apache configuration. This is the integrated file system directory where you would like to store the XSockets WAR file.CPY OBJ('/QSYS.LIB/XXXX.LIB/QATTIFS2.FILE/XSOCK.MBR') TOOBJ('/www/<server_name>/xsock.war') FROMCCSID(*OBJ) TOCCSID(819) OWNER(*NEW) -
Extract the WAR file.
-
From a command line, enter
where <server_name> is the name of the server instance you created during Apache configuration.CD DIR('/www/<server_name>') -
Enter the following command on the command line to extract the files stored in the XSockets WAR
file.
STRQSH CMD('jar xf xsock.war')
-
From a command line, enter
- Optional: Update the web.xml file: Note: This step is only necessary if Xsockets was installed to a library other than XSOCKETS during Xsockets configuration.
- From a command line, enter
wrklnk 'WEB-INF/web.xml' - Press function 2 (Edit) to edit the file.
- Find the
</servlet-class>line in the web.xml file. - Update the following code after this
line:
In place of the xsockets, insert the library name that you created during Xsockets configuration.<init-param> <param-name>library</param-name> <param-value>xsockets</param-value> </init-param> - Save the file and exit the edit session.
- From a command line, enter
to create a new XSockets WAR file containing the updated configuration file.STRQSH CMD('jar cmf META-INF/MANIFEST.MF xsock.war lib WEB-INF')
- From a command line, enter
- Optional: Add the authority check to httpd.conf
file. This forces Apache to authenticate users trying to access the Xsockets Web application.Note: It is also necessary for getting write access to create UNIX sockets.
- From a command line, enter
where <server_name> is the name of the server instance you created during the Apache configuration. For example, if you choose xsocks for the server name, you can enter:wrklnk '/www/<server_name>/conf/httpd.conf'wrklnk '/www/xsocks/conf/httpd.conf' - Press function 2 (Edit) to edit the file.
- Insert the following lines at the end of the file.
<Location /xsock> AuthName "X Socket" AuthType Basic PasswdFile %%SYSTEM%% UserId %%CLIENT%% Require valid-user order allow,deny allow from all </Location> - Save the file and exit the edit session.
- From a command line, enter