Transform Java Project to Web Project [message #161086] |
Fri, 17 February 2006 17:22  |
Eclipse User |
|
|
|
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   |
Eclipse User |
|
|
|
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.
|
|
|
|
|
|
|
|
Powered by
FUDForum. Page generated in 0.03508 seconds