My application works fine on the dev server but when I upload it fails to start and I get the following exception in the logs: java.lang.NoClassDefFoundError: org/apache/jasper/runtime/JspSourceDependent. So far it seems to be related to the jsp dependencies declared in my app which are:
<dependency>
<groupId>javax.servlet</groupId>
<artifactId>servlet-api</artifactId>
<version>2.5</version>
<scope>provided</scope>
</dependency>
<dependency>
<groupId>javax.servlet.jsp</groupId>
<artifactId>jsp-api</artifactId>
<version>2.1</version>
<scope>provided</scope>
</dependency>
<dependency>
<groupId>javax.servlet</groupId>
<artifactId>jstl</artifactId>
<version>1.2</version>
<scope>provided</scope>
</dependency>
<dependency>
<groupId>javax.el</groupId>
<artifactId>el-api</artifactId>
<version>2.2</version>
<scope>provided</scope>
</dependency>
I am missing something obvious here, and why does the app work fine in the dev environment but fail to start up in the production environment?
The exception was due to the pre-compilation of JSPs using the jspc-maven-plugin which left tomcat-specific code in the pre-compiled classes. The solution was to remove the plugin from the pom and let appcfg do the pre-compiling before uploading.