views:

61

answers:

3

Hi All,

I have three war files (War-Common, War-Physical, War-Derivatives) and we are packaging them in an EAR file. 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. We are acutally placing jsp custom tags inside it but I am not able to access them.

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.

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. I guess you cannot access content of WEB-INF in other war files.

A: 

It seems its not possible to access web-inf content from one war to another war..so closing this question..

A: 

Hi user368957,

I too have a similar requirement to share the common static resources like images/css/javascript for multiple WARs.

I have been finding the solutions for this purpose and it would be helpful if you can share how you were able to achieve this task.

I do not have to access JSPs or WEB-INF contents but only static resources like images/css/javascript. May be by maintaining them in EAR content or may be by maintaining in a Utility WAR and then referring this Utility.WAR in other WAR applications?

Regards, Satya

Satya
A: 

You can put your static files (images/css/javascript etc.) in one core-war(with root context or any other other context). You can then access them easily.