Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Language IDEs » ServerTools (WTP) » WAR file not exploded at org.eclipse.wst.server.core
WAR file not exploded at org.eclipse.wst.server.core [message #629118] Mon, 27 September 2010 09:33 Go to next message
No real name is currently offline No real nameFriend
Messages: 2
Registered: September 2010
Junior Member
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
Re: WAR file not exploded at org.eclipse.wst.server.core [message #629208 is a reply to message #629118] Mon, 27 September 2010 13:27 Go to previous messageGo to next message
Larry Isaacs is currently offline Larry IsaacsFriend
Messages: 1354
Registered: July 2009
Senior Member
On 9/27/2010 5:33 AM, 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
Re: WAR file not exploded at org.eclipse.wst.server.core [message #630505 is a reply to message #629208] Sun, 03 October 2010 13:39 Go to previous messageGo to next message
No real name is currently offline No real nameFriend
Messages: 2
Registered: September 2010
Junior Member
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.

Re: WAR file not exploded at org.eclipse.wst.server.core [message #630666 is a reply to message #630505] Mon, 04 October 2010 13:44 Go to previous message
Larry Isaacs is currently offline Larry IsaacsFriend
Messages: 1354
Registered: July 2009
Senior Member
On 10/3/2010 9:39 AM, 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.

Cheers,
Larry
Previous Topic:Error starting HTTP Preview Server
Next Topic:Flex Builder plugin for Helios 64 bit + WTP
Goto Forum:
  


Current Time: Thu Apr 25 10:21:46 GMT 2024

Powered by FUDForum. Page generated in 0.02943 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top