Install the servlet filter sample.
Ensure you have the PingAccess Agent SDK for Java, Apache Maven, and Apache Tomcat. These instructions assume that you are using Apache Tomcat.
- The servlet filter sample is installed under <AGENT_SDK_JAVA_HOME>/sample.
- A deployed version of the servlet filter is under <AGENT_SDK_JAVA_HOME>/sample/target/agent-sample.
For the initial setup of the web application, we assume you already have Tomcat or
another application server set up on the same machine hosting PingAccess. Out of the
box, PingAccess generates self-signed server certificates for listeners servicing
runtime ports with the hostname localhost
. By default, the servlet
filter sample configures the Java Agent, Java Agent API, to use strict certificate
checking for communications with PingAccess. The Java Agent will not be able to
communicate with PingAccess over HTTPS if it is not also on
localhost
because of strict hostname checking. If PingAccess
already has a server certificate configured with a valid hostname other than
localhost
, then you can deploy the Java Agent into a container
on another system.
If you cannot setup the application server on the same system as an existing
PingAccess service, and that PingAccess deployment still uses the default
localhost
server certificate for the agent port, there is
another option. You can change the default strict
certificate
checking in agent-sample/WEB-INF/web.xml to
test
. See the comments in
agent-sample/WEB-INF/web.xml for more detail.