ApplinX supports printer sessions on AS/400 and mainframe hosts. ApplinX connects to the host, retrieves the print buffers and analyzes them. The host handles the printer’s queue and the connection of printer sessions to display sessions. ApplinX connects to the host as a printer session to receive the print buffers and allows you to work with them.
One of the ways you can print with ApplinX is using the default behavior of an emulator, where ApplinX sends all print jobs to the client’s machine by means of an applet that runs on the client’s browser. It is a signed applet, as it is Java code and it invokes the client machine’s print dialog, which requires permissions that exceed regular applet permissions. Once the applet is signed it can only address the server where the applet originated, and therefore requires that the Web server and ApplinX server are on the same machine. When it is not possible to have the Web server and ApplinX server on the same machine, it is necessary to use the ApplinX Printlet Servlet Redirector.
The Printlet Servlet Redirector enables connection of the printlet to the Web server machine through the public HTTP/S port. The printlet server URL is defined as the URL of the Redirector Servlet instead of the ApplinX server URL. In this way the Servlet Redirector redirects the data coming from the Printlet to ApplinX server and vice versa.
In the current implementation, this solution does not support architectures with load balancing or clustering, as all communication of the printlet must go through the same Web session of the same Web server machine.
Note:
This feature is currently available for the JSP framework only.
To install and activate the Printlet Servlet Redirector
Activate the Redirector:
Edit the web.xml file located under your web project (<web_dir>\WEB-INF\) as follows: Copy the commented section labeled “Listeners” from \new jsp\new_application\WEB-INF\web.xml to your web.xml and uncomment the listener tag.
<listener> <listener-class> com.sabratec.util.net.redirector.http.servlet.GXRedirectorServletSessionListener </listener-class> </listener>
Add the following tags:
<context-param> <param-name>GXServerURL</param-name> <param-value>applinx://localhost:2323</param-value> <description>ApplinX server URL</description> </context-param>
Change the server URL to point at the machine where ApplinX is running.
Edit the run_printlet.jsp file which is in your
Web application root directory: Change the param serverURL to
http://<web_server_name>:8080/<web_app>/z_redirector.jsp
Restart the Web server.
Make sure that in your architecture, that the same IP address (or machine name) of the Web server, where the servlet redirector is enabled, is used for the following:
Calling the page run_printlet.jsp in the browser.
web_server_name
set in the printlet parameters (in
run_printlet.jsp).