facebook

Importing from WAR file

  1. MyEclipse IDE
  2.  > 
  3. Java EE Development (EJB, JSP, Struts, XDoclet, etc.)
Viewing 4 posts - 1 through 4 (of 4 total)
  • Author
    Posts
  • #270326 Reply

    Marty Hall
    Member

    I 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

    #270363 Reply

    Riyad Kalla
    Member

    Marty,
    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.

    #270402 Reply

    Marty Hall
    Member

    You 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?

    #270405 Reply

    Riyad Kalla
    Member

    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?

    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

Viewing 4 posts - 1 through 4 (of 4 total)
Reply To: Importing from WAR file

You must be logged in to post in the forum log in