- This topic has 3 replies, 2 voices, and was last updated 17 years, 6 months ago by Riyad Kalla.
-
AuthorPosts
-
Marty HallMemberI have an existing Web application in a WAR file (or an exploded directory). How can I import it directly into MyEclipse?
I can create a new MyEclipse Web project and drop the pieces in the right place, but I would like to do this all at once. I thought at one point I saw a “From WAR file” option under “File –> Import”, but it is not there now (if it ever was). See below.
Suggestions?
Thanks-
– Marty
Riyad KallaMemberMarty,
The from-war functionality was likely from WTP, not MyEclipse. THe reason for this is that WAR is a binary deployable format, not a project format. So *technically* it doesn’t make sense to allow the importing of a WAR file (e.g., no source code).But if you DO have a WAR with source code and all the proper project artifacts, dropping them into a project is the way to go, then sharing that project using File > Export > Archive and exporting it to a ZIP and sharing it with co-workers.
Marty HallMemberYou are quite right; I had WTP installed before, but now use MyEclipse from the all-in-one installer.
Suppose I *do* have a WAR file that contains source as well as .class files. Is the fastest way to import it to unzip it then drop the pieces into a new project in the right place? Or is there some all-at-once approach?
Riyad KallaMemberSuppose I *do* have a WAR file that contains source as well as .class files. Is the fastest way to import it to unzip it then drop the pieces into a new project in the right place? Or is there some all-at-once approach?
Nope, you got it. That’s the way to do it. But thankfully you only need to do it once, and it should be fairly straight forward since your “WebRoot” directory pretty much represents your deployed WAR anyway. So besides keeping the source dir out of it, everything else can be dropped in.
A typical layout of a web project is here:
http://www.myeclipseide.com/PNphpBB2-viewtopic-t-11099.html -
AuthorPosts