[ 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


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

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