Importing a war into a dynamic web project [message #230615] |
Thu, 23 April 2009 07:24  |
Eclipse User |
|
|
|
I wish to import a war file into a dynamic web project. All easy. But, I
wish for the war to not be packaged as another web project with my dynamic
web project. Not easy.
More specifically:
Before I import, my file / folder structure is:
\myproj\.metadata
\myproj\.settings
\myproj\build
\myproj\src
\myproj\WebContext
I then import my war. I am prompted for:
1. WAR file
2. Web Project
3. etc
Whatever I specify for the Web Project, Eclipse creates a subdirectory
with this name.
So if I do
Web Project = mywar
Eclipse does creates a new sub folder, mywar, and unpacks the war there:
e.g.
\myproj\mywar
\myproj\mywar\.settings
\myproj\mywar\build
\myproj\mywar\src
\myproj\mywar\WebContext
\myproj\mywar\.classpath
\myproj\mywar\.project
This makes things messy as I have two WebContext directories, two src
directories and two build directories.
I'd much prefer to unpack the war into the existing \WebContext
\.classpath \.project directories, rather than create new ones. Is there
anyway to do this?
|
|
|
|
|
|
Re: Importing a war into a dynamic web project [message #230676 is a reply to message #230639] |
Fri, 24 April 2009 05:53  |
Eclipse User |
|
|
|
Thanks for getting back. I tried:
1. creating a new workspace
2. containing a dynamic web project underneath the workspace
So my dir structure is:
workspace.home\.metdata
workspace.home\mydynamicwebproject
workspace.home\mydynamicwebproject\.settings
workspace.home\mydynamicwebproject\build
workspace.home\mydynamicwebproject\src
workspace.home\mydynamicwebproject\WebContent
workspace.home\mydynamicwebproject\.classpath
workspace.home\mydynamicwebproject\.project
I then right click, and select to import my external war.
I am prompted to specify the webproject for it, I specify
\mydymanicwebproject
I am not allowed. I get: A project already exists with this name.
I create a new dynamic web project and I move this to a remote location,
away from the workspace altogether.
I try to import a war again. I specify this project as the webproject. I
get same error message.
So it appears you can't import a war into an existing dynamic web project.
You can of course specify a new web project name for the war but this will
just create another web project for the war, rather than use an existing
one.
|
|
|
Powered by
FUDForum. Page generated in 0.04011 seconds