[英]Access a page of one war file from another war file?
注意:我无法将它们打包到EAR中。 这里有一些限制。
我有2个战争档案。
help.war和helpConnect.war
两者都放在GlassFish服务器的同一个域中。
从help.war的索引页面访问helpConnect.war中的页面,就像这样..
<a href="helpConnect/HelpInternal/index.htm">Help Internal</a>
这不起作用,因为当我尝试访问服务器时,它尝试访问的URL就是这样的..
http://localhost:8080/help/helpConnect/HelpInternal/index.htm
但是,由于helpConnect是一个完全不同的war文件,我需要这样的URL
http://localhost:8080/helpConnect/HelpInternal/index.htm
知道如何解决这个问题吗?
你正在使用相对路径。 你需要一个绝对的路径:
<a href="/helpConnect/HelpInternal/index.htm">Help Internal</a>
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.