facebook

[Closed]How to import an struts project in MyEclipse?

💡
Our Forums Have Moved

For help with installation, bugs reports or feature requests, please head over to our new forums.
Genuitec Community on GitHub

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

    bigearchina
    Member

    hello,

    I now have an existing struts project in hand and want to import it to MyEclipse, but I can’t find the way to get it, does anyone can help me out ? Thanks very much.

    I find the ‘import’ from file menu, but it can only import the project as an ordinary webapps despite it contains “struts-config.xml” in it.

    #244823

    Riyad Kalla
    Member

    There is no direct way to import a WAR or non-eclipse project into MyEclipse. The fastest way would be to create a new Web Project, add Struts capabilities to it, then slowly start copying over your files from your existing project into the new one.

    #245829

    ekeland
    Member

    Hi,

    I really would like to use MyEclipse but have the same issues as bigearchina. I already have a complex Struts apps that I would like to import in MyEclipse. I understand there is no direct way, but could you specify what you mean by

    slowly start copying over your files from your existing project into the new one

    ?
    Which option do you meant by copying?
    1. Copying is a simple duplication of all the files jsp, java, tld in the appropriate folders?
    2. Copying chunks independant chunks of programs with the appropriate struts-config.xml until everything is duplicated?
    3. Recreating all the files via the struts-config.xml until the entire project is similar to the original?

    The amount of work is not the same depending on the option chosen…

    Thanks in advance for your answer!

    Paul

    #245833

    Riyad Kalla
    Member

    Paul,
    I would approach the task as follows:

    1) Create the new MyEclipse project as I mentioned
    2) Open your existing project, copy all the source code across into the /src directory of your new project. You might get build errors due to missing libraries.
    3) Now copy all the missing libraries from your /lib dir of your existing project into the new MyEclipse project /lib dir, make sure they are autoadded to your build path or add them manually. Hopefully a lot of the errors were cleared up.
    4) Now you can copy across all your descriptors and TLD files into the WEB-INF or appropriate directory. NOTE: Please make sure in step 1 you created the right version of your web application, if you are using J2EE 1.3 or 1.4 (web spec 2.3 or 2.4) to match what you already had. ALSO make sure to add the correct version of struts (1.1, 1.2)
    5) Now lastly, copy all the web content (jsps, images, css, etc.) into your webroot dir.

    Now I would suggest a Project > Clean and let the entire project rebuild and see if it does without errors, slowly track down errors and fix them if necessary.

    #245930

    ekeland
    Member

    Works quite well. Thanks Riyad

    #245935

    Riyad Kalla
    Member

    Glad to hear it, I was worried the steps would be too ambiguous but it seems you nailed it.

Viewing 6 posts - 1 through 6 (of 6 total)
Reply To: [Closed]How to import an struts project in MyEclipse?

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