简体   繁体   中英

Can I split class files of same java package into jar file and classes folder on Tomcat?

Say I use Tomcat AP server and I have 10 class files in package 'foo'. Can I, say, zip 8 of them into a jar file, put this jar file into 'WEB-INF/lib' folder and then put 2 of them into 'WEB-INF/classes/foo' folder. Will Tomcat treat them as a single pacakge when running webapp?

Note: I have a practical reason to do this.

You can use the Maven War plugin. It can be configured to place specific artifacts into different directories in your War-file.

See the solution to this at: Stackoverflow HowTo

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM