Currently trying to setup multiple subdomains/domains in my Tomcat and I'm needing them all to use the same WEB-INF/classes/ for everything.

Basically my folder structure is like so:

Z:/
project/
    assets/   (assets.domain.com)
    main/     (www.domain.com)
    dev/      (dev.domain.com)
    WEB-INF/  (the WEB-INF I want everyone using.)
        classes/
            com/
                example/

So basically I need assets.domain.com, www.domain.com, and dev.domain.com to go up one level in the directory to find the WEB-INF and use the Java classes stored there... Is there any way to accomplish this? Thanks!

有帮助吗?

解决方案

if you are trying to share java code across webapps, you will need to package them as jar and place it in either server/lib or endorsed folder . then each deployed webapp will have access to the same class files.

许可以下: CC-BY-SA归因
不隶属于 StackOverflow
scroll top