简体   繁体   English

战争中的WEB-INF内容访问

[英]WEB-INF content access in another war

I have three war files (War-Common, War-Physical, War-Derivatives) and we are packaging them in an EAR file. 我有三个战争文件(战争普通文件,战争物理文件,战争衍生产品),我们将它们包装在EAR文件中。 I am able to access content (Images, CSS, JavaScripts etc.) of War-Common in War-Physical and War-Derivatives but I am not able to access content of WEB-INF folder of War-Common War. 我可以在War-Physical和War-Derivatives中访问War-Common的内容(图像,CSS,JavaScript等),但无法访问War-Common War的WEB-INF文件夹的内容。 We are acutally placing jsp custom tags inside it but I am not able to access them. 我们将jsp自定义标签放入其中,但我无法访问它们。

I tried: 我试过了:

<script type="text/javascript" src="/scripts/test.js"></script> 
<script type="text/javascript" src="/WEB-INF/tags/Calendar.tag"></script>

But I am not able to use Calendar.tag. 但是我无法使用Calendar.tag。

Its not only tags that cannot be accessed, I am not able to access jsp from WEB-INF folder in War-Physical and War-Derivatives. 它不仅无法访问标签,而且无法从War-Physical和War-Derivatives中的WEB-INF文件夹访问jsp。 I guess you cannot access content of WEB-INF in other war files. 我想您无法在其他战争文件中访问WEB-INF的内容。

从一场战争到另一场战争似乎无法访问Web-inf内容。因此解决了这个问题。

You can put your static files (images/css/javascript etc.) in one core-war(with root context or any other other context). 您可以将静态文件(图像/ css / javascript等)放入一个核心战争中(具有root上下文或任何其他上下文)。 You can then access them easily. 然后,您可以轻松访问它们。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

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