After you have configured Tomcat on the HTTP server (powered by
Apache) to use the Xsockets tool, you must complete manual changes to several
configuration files for the instance. There are three files you need to update:
the web.xml file, the JAR file, and the httpd.conf.
To complete these steps you need to know the following
information:
- Update the web.xml file:
- From a command line, enter
wrklnk '/www/<server_name>/webapps/xsock/WEB-INF/web.xml'
where <server_name> is the name of the server instance you created
during Apache configuration. For example, if you choose xsocks for
the server name, you can enter: wrklnk '/www/xsocks/webapps/xsock/WEB-INF/web.xml'
- Press 2 to edit the file.
- Find the </servlet-class> line in the
web.xml file.
- Insert the following code after this line:
<init-param>
<param-name>library</param-name>
<param-value>XXXX</param-value>
</init-param>
In place of the XXXX, insert the library name
that you created during Xsockets configuration.
- Save the file and exit the edit session.
- Move JAR file From a command line, enter this command:
CPY OBJ('/QSYS.LIB/XXXX.LIB/QATTIFS2.FILE/TSOXSOCK.MBR')
TOOBJ('/www/<server_name>/webapps/xsock/WEB-INF/lib/tsoxsock.jar')
FROMCCSID(*OBJ) TOCCSID(819) OWNER(*NEW)
where XXXX is the library name that you created during Xsockets
configuration and <server_name> is the name of the server instance
you created during HTTP server
(powered by Apache) configuration.
- 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
wrklnk '/www/<server_name>/conf/httpd.conf'
where <server_name> is the name of the server instance you created during
Apache configuration. For example, if you choose xsocks for the server name,
you can enter: wrklnk '/www/xsocks/conf/httpd.conf''
- Press 2 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.