Tomcat Category

GlassFish VS Tomcat

Overview: GlassFish and Tomcat GlassFish is the open source application server delivered by Sun Microsystems for the Java EE platform. which was originally launched by Sun in 2005. On 4 May 2006, Project GlassFish released the first version that supports the Java EE 5 specification.Currently it is avaiable for versions 3.0.1, 3.1, 3.2 and 4.0 with […]

Jetty VS Tomcat Performance Comparison

Jetty VS Tomcat Overview Jetty and Tomcat are open servlet containers, both of them support HTTP server, HTTP client and javax.servlet container. In this article, we will quick view the difference between Jetty and Tomcat, and give the generic idea about which is the better one. You may think it is not make sense to […]

Tomcat throws java.lang.IllegalStateException: Post too large

I recently developed an online website using tomcat 5.5 as web server, one functionality is that the end user changes their profile and uploads image, when the size of image is 500×600 there have no any problem, when changing the size to 800×800 I ran into java.lang.IllegalStateException: Post too large exception, I finally determined IllegalStateException: Post […]

How to resolve Tomcat java.lang.NoClassDefFoundError exception

I’m recently working on a large online website and using Tomcat in development phase, I broke the tomcat so that I got the NoClassDefFoundError exception. Here is the stack trace of NoClassDefFoundError. ClassNotFoundException: at org.apache.catalina.loader.WebappClassLoader.loadClass( at org.apache.catalina.loader.WebappClassLoader.loadClass( at java.lang.ClassLoader.loadClassInternal( at SecurePaymentAjaxData.doPost( at javax.servlet.http.HttpServlet.service( at javax.servlet.http.HttpServlet.service( at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter( at org.apache.catalina.core.ApplicationFilterChain.doFilter( at org.apache.catalina.core.StandardWrapperValve.invoke( at org.apache.catalina.core.StandardContextValve.invoke( at […]

How to Get Tomcat Port Number in Java Code

version 2 – 2012-12-01

How to Change Tomcat Port

In Tomcat, all configuration information are maintained in file server.xml, the default tomcat port number is 8080. However the default port might conflict with other programs when starting up tomcat, in such case, you could meet the error ‘the tomcat server port 8080 is already in use’. The follow steps demonstrate how to change tomcat […]