Inspecting Tomcat HTTPS connection with Wireshark

Wireshark allows you to inspect SSL connection as long as you have the corresponding private key of the server side. You can read the details here. But if you are using java and tomcat you’ll probably have the certificate and private key stored in a JKS keystore so how can you extract the key in the right format for WireShark? First of all, keytool doesn’t allow you to extract the private key from a keystore. So you need external help. I use the DumpPrivateKey.java which is a modified version on the DumpPrivateKey found in this forum post. ...

June 29, 2007

(Tomcat 5.5.x) java.lang.NoClassDefFoundError: javax/servlet/http/HttpSessionListener

Or java.lang.NoClassDefFoundError: javax/servlet/ServletContextListener for that matter. NoClassDefFoundError on HttpSessionListener , ServletListener , ServletContextListener, etc. can be caused by a custom classloader like Sysdeo DevLoader (I use it with Eclipse) in you Context definition in the Tomcat’s server.xml file. <Loader classname="org.apache.catalina.loader.DevLoader" reloadable="true" debug="1" /> the solution: add useSystemClassLoaderAsParent="false" to the Loader <Loader classname="org.apache.catalina.loader.DevLoader" reloadable="true" debug="1" useSystemClassLoaderAsParent="false"/> This should do the trick. More information here and here

April 13, 2007