0

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!

4

1 回答 1

1

如果您尝试跨 webapps 共享 java 代码,则需要将它们打包为 jar 并将其放置在 server/lib 或 endorsed 文件夹中。然后每个部署的 webapp 都可以访问相同的类文件。

于 2013-10-02T01:45:09.730 回答