TestServlet
The TestServlet was introduced to permit testing of the nevisProxy servlet container. You can also use the servlet to initially verify a correct nevisProxy setup.
By running the TestServlet on a certain server, you enable code execution on this server. This is needed for debugging, but also allows an attacker to gain complete control over the server. Therefore, never use the TestServlet in a productive setup!
ch::nevis::navajo::servlet::examples::TestServlet
libTestServlet.so.1
Configuration
There are no configuration parameters.
Example
With the sample code below you can set up a TestServlet for debugging.
<servlet>
<servlet-name>NevisTestServlet</servlet-name>
<servlet-class>ch::nevis::navajo::servlet::examples::TestServlet</servlet-class>
</servlet>
<servlet-mapping>
<servlet-name>NevisTestServlet</servlet-name>
<url-pattern>/nevis/test/*</url-pattern>
</servlet-mapping>
The URL /nevis/test/
connects to a page with links whose URLs the TestServlet understands. The most common links are (all prefixed by /nevis/test/
):
- request/: The response contains a list of the most common request attributes, like the headers, the parameters, etc.
- session/: Creates a session (or reuses an already created one). As a result, you will see all information related to that session.
- invalidate/: Invalidates the session, if there is one.
You find the above example in examples/various/TestServlet.example
on the installed nevisProxy package.