Skip to main content



      Home
Home » Language IDEs » ServerTools (WTP) » Transform Java Project to Web Project
Transform Java Project to Web Project [message #161086] Fri, 17 February 2006 17:22 Go to next message
Eclipse UserFriend
Originally posted by: medeski.gmx.net

Hi,

could anyone please tell me if there is a way to change the project type
of an existing standard java project to a 'Dynamic Web Project'?

Thx

John
Re: Transform Java Project to Web Project [message #161149 is a reply to message #161086] Sat, 18 February 2006 14:40 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: alex_blewitt.yahoo.com

I don't know if there's a UI-friendly way of doing this.

However, it should be relatively easy without having to move it directly. You'll need to create a new empty Dynamic Web Project first, to find out what files there are. For example, there may be a file/directory called '.dynamicweb' as well as (presumably) some kind of WEB-INF/classes folder. Those are the basic items that you'll need in your new project, and you can just copy them over from an empty Dynamic web into yours.

What really controls whether it turns up in the list as a dynamic web project, however, is the .project file. Inside there, you'll find a list of natures and builders; these are the special markers that tell Eclipse what kind of project it is. You'll need to compare the difference between the two to find out what kind of ones need to be copied over. Bear in mind that the project's name (the one that's shown in the list) is also stored in the .project file, and so you won't just be able to copy/paste the file in its entirety.

I'd also expect a dynamic web project to add some entries to the .classpath, so check the new project to see what it puts in there. It might add an entry like 'classpath type="con" value="DYNAMIC_WEB"' or similar.

IF that's all a litle too much like hard work, you can always just move the classes/source files/icons from the old project to the one you've just created :-)

Alex.
Re: Transform Java Project to Web Project [message #161317 is a reply to message #161149] Tue, 21 February 2006 03:22 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: medeski.gmx.net

Thanks, Alex!

After some time of trying I finally got it working,

John
Re: Transform Java Project to Web Project [message #161982 is a reply to message #161149] Fri, 24 February 2006 15:14 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: user.domain.invalid

> IF that's all a little too much like hard work, you can always just move the classes/source files/icons

>from the old project to the one you've just created :-)

That doesn't work so well when you have a project in CVS or SVN, which
you definitely should.

What I have found a bit easier - but it's still not that great - is to
delete the project (using the eclipse explorer) but NOT the
contents(!!). Then I create a new Dynamic Web Project with the same
name, which Eclipse creates over top of the old one. You have to tell it
whatever names you used for src and web directories previously.

As always, your mileage may vary, begin with a backup, and so on.
Re: Transform Java Project to Web Project [message #161988 is a reply to message #161149] Fri, 24 February 2006 15:15 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: user.domain.invalid

> IF that's all a little too much like hard work, you can always just move the classes/source files/icons

>from the old project to the one you've just created :-)

That doesn't work so well when you have a project in CVS or SVN, which
you definitely should.

What I have found a bit easier - but it's still not that great - is to
delete the project (using the eclipse explorer) but NOT the
contents(!!). Then I create a new Dynamic Web Project with the same
name, which Eclipse creates over top of the old one. You have to tell it
whatever names you used for src and web directories previously.

As always, your mileage may vary, begin with a backup, and so on.
Re: Transform Java Project to Web Project [message #162004 is a reply to message #161988] Fri, 24 February 2006 16:37 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: alex_blewitt.yahoo.com

It works fine as long as you copy the metadata across as well (like the CVS folders). The key point is that there's a couple of specific files that Eclipse needs to find, and those are the ones to create. Usually Eclipse will prevent you from creating a project on top of an existing file location.

Alex.
Re: Transform Java Project to Web Project [message #163684 is a reply to message #161149] Mon, 13 March 2006 01:03 Go to previous message
Eclipse UserFriend
Alex Blewitt wrote:
> I don't know if there's a UI-friendly way of doing this.

Providing a UI-friendly way to do this was briefly mentioned in bug
130174, however there are no plans to currently implement it short
of contributions from the community.

https://bugs.eclipse.org/bugs/show_bug.cgi?id=130174

--
- Nitin
Previous Topic:Problem using Eclipse with Sun App Server
Next Topic:library inclusion in Javascript
Goto Forum:
  


Current Time: Tue Apr 15 01:21:01 EDT 2025

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

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

Back to the top