There is a feature in servlet 3.0 that allows you to package resources (images, jsp, etc.) in a JAR file. What you do is in your jar file, you create META-INF/resources
and dump anything you want in there including directories for structuring your resources. What happens is that META-INF/resources
will be mapped to the docroot
of your web application.
When there is a clash of resource between your app and the JAR file, your apps resource will be returned. See this
Tomcat 7 supports Servlet 3 so it should support this feature
与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…