WAR file not exploded at org.eclipse.wst.server.corehttps://www.eclipse.org/forums/index.php/mv/msg/197314/629118/#msg_629118
I created Dynamic Web Module (web1) and created Server project (Tomcat).

Now I have external WAR file that contains images and css that I want to use from web1.

So I decided to create another Dynamic Web Module (web2) and put the war file in this module. So when I will run Tomcat server I will see 2 web applications. and I can reference images on web2 from web1.

The problem is that the WAR file is not exploded in: .metadata\.plugins\org.eclipse.wst.server.core\tmp0\wtpwebap ps\web2
The folder looks like this:
META-INF
WEB-INF
images.war

So I can't reference to web2 files.

Is there a way to tell tomcat to explode the WAR file?
Maybe there is better solution, instead of creating Dynamic Web Module for the WAR file.

Thanks in advance
]]>No real name2010-09-27T09:33:25-00:00Re: WAR file not exploded at org.eclipse.wst.server.corehttps://www.eclipse.org/forums/index.php/mv/msg/197314/629208/#msg_629208
israel.lavi@comverse.com wrote:
> Hi,
>
> I created Dynamic Web Module (web1) and created Server project (Tomcat).
> Now I have external WAR file that contains images and css that I want to
> use from web1.
>
> So I decided to create another Dynamic Web Module (web2) and put the war
> file in this module. So when I will run Tomcat server I will see 2 web
> applications. and I can reference images on web2 from web1.
>
> The problem is that the WAR file is not exploded in:
> .metadata\.plugins\org.eclipse.wst.server.core\tmp0\wtpwebap ps\web2
> The folder looks like this:
> META-INF
> WEB-INF
> images.war
>
> So I can't reference to web2 files.
>
> Is there a way to tell tomcat to explode the WAR file?
> Maybe there is better solution, instead of creating Dynamic Web Module
> for the WAR file.
>
> Thanks in advance
>

In web2, the images.war is being seen as no more that a file in the
content of the Dynamic Web Project. The fact that the file ends with
".war" has no special meaning. You will need to expand the images.war
in the project's web content folder so it is already expanded in the
web2 project. If you Import the images.war, creating a new Dynamic Web
Project project, it should do this for you.

An alternative approach is to manually modify the server.xml under the
Servers project in your workspace. You could add a <Context> to
directly serve the war from where it exists on your system (i.e. set
"docBase" to point to the war). It's not clear which approach would be
more convenient.

Cheers,
Larry]]>Larry Isaacs2010-09-27T13:27:33-00:00Re: WAR file not exploded at org.eclipse.wst.server.corehttps://www.eclipse.org/forums/index.php/mv/msg/197314/630505/#msg_630505
But the first solution will not work.

I want the war file to be in my project directory under source control, where I can replace it from time to time.
I want the war file to be exploded in org.eclipse.wst.server.core folder (where all server files exists, when I run tomcat from eclipse).

I can extract the war manually and put it in org.eclipse.wst.server.core folder, and it will work, but I understand that when running tomcat from eclipse it should be automaticly.

]]>No real name2010-10-03T13:39:06-00:00Re: WAR file not exploded at org.eclipse.wst.server.corehttps://www.eclipse.org/forums/index.php/mv/msg/197314/630666/#msg_630666
israel.lavi@comverse.com wrote:
> Thanks for the answer,
>
> But the first solution will not work.
>
> I want the war file to be in my project directory under source control,
> where I can replace it from time to time.
> I want the war file to be exploded in org.eclipse.wst.server.core folder
> (where all server files exists, when I run tomcat from eclipse).
>
> I can extract the war manually and put it in org.eclipse.wst.server.core
> folder, and it will work, but I understand that when running tomcat from
> eclipse it should be automaticly.
>
>

WTP doesn't support the use case of treating a war file as if it were a
project. If you create a dynamic web project from the war, WTP can
deploy it for you. If not a dynamic web project, then you will have to
handle the deployment yourself. If auto-deployment is still enabled,
you could simply drop the war in the
"org.eclipse.wst.server.core/tmp?/webapps" folder and let Tomcat do its
normal auto-deployment.