[ tomcat 6.0 ] deploy the application outside webapps

~\Tomcat 6.0\conf\server.xml

<Context path="/yourAppURI" reloadable="true" docBase="C:\path\to\your\app\" />

Tips : don’t forget to put the binary compiled java in /classes folder

Advertisements

changing webapp classpath loading order in junit

We have a legacy class that override the class from the jar file.

That override works well in webapp, but not in Junit. This is the Junit solution.

The load order of tomcat from ziggy

Bootstrap classes of your JVM
System class loader classes (described above)
/WEB-INF/classes of your web application
/WEB-INF/lib/*.jar of your web application
$CATALINA_HOME/common/classes
$CATALINA_HOME/common/endorsed/*.jar
$CATALINA_HOME/common/i18n/*.jar
$CATALINA_HOME/common/lib/*.jar
$CATALINA_BASE/shared/classes
$CATALINA_BASE/shared/lib/*.jar

Therefore, in Junit, we set the order of classpath correctly, and the problem gone.

รูปภาพ