facebook

How to upgrade a project from Struts 1.1 to 1.2

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

    David Ely
    Participant

    I’ve just upgraded to MyEclipse version 3.8.3. Currently, I have a web project that references struts 1.1 files. How do I get the project to “point to” the struts 1.2.x files? There doesn’t appear to be any way within the project properties screen to switch between struts 1.1 and 1.2.

    If I missed this in the FAQ, please accept my humble apologies.

    System configuration:

    Windows XP (SP2) box running eclipse 3.0.1 + myeclipse 3.8.3

    #221252 Reply

    Riyad Kalla
    Member

    David,
    This would be a manual update step, or you could just remove web capabilities then re add them and re add struts capabilities… althought it might be a lot of steps. Please be aware of the changes in Struts 1.2 that will effect you (most notably the new taglib URIs).

    #221300 Reply

    czernay
    Member

    Thanks a lot, that completly killed my project!

    I removed the web-capabilities, re-added them, got lots of errors concerning my “wrong” web.xml configuration. I moved web.xml to web.xml.copy and did it again. Seemed to work. Added Struts 1.2 support (after finding out that I had to close and re-open the project and still then had to use the content-menu on the project-explorer rather than the MyEclipse menu – why?????) – got lots of errors, telling my struts-config.xml was wrong (it worked perfectly well with manually added Strust 1.2.4 libs though), renamed that, too. Tried again. Errors! Removed web capabilities again. Went throught all the nightmare again! Added struts capabilties – seemed to work, but didn’t. Now I get “Thes currently displayed page contains errors.” whenever I try to open the project properties/myeclipseid struts page. On that I hardly get any resonable information: version, servlet and action pattern fields are empty, base package field is much too small.

    There must be a simple Struts upgrade option integrated into MyEclipseIDE!

    #221306 Reply

    Riyad Kalla
    Member

    David,
    I confirmed that these steps worked locally before ever suggesting them to you; I’m sorry you ran into such a headache when you tried it. As a quick workaround you can try the following:

    1) Create a new Web Project, add Struts capabilities to it
    2) Grab your 2nd project, and copy it (don’t move it) ontop of the new project directory by directory.

    See if by copying your old (dead?) project into your new project can help clean things up. If you absolutely cannot get this to work, please email a copy of your project to support@genuitec.com ATTN Riyad, and I’ll try and clean it up locally then post it for you to get.

    #221366 Reply

    David Ely
    Participant

    Riyad,

    Note #1, I did not send the original reply to your message.

    I was able to get switched over to struts 1.2. I ended up renaming my struts-config.xml file (to something else); I then deleted Web capabilities; then re-added them; then added struts capabilities. For some reason, the *.jar and *.tld files didn’t get copied to my WEB-INF/lib directory, so I ended up doing that by hand. I then modified my renamed struts-config.xml file to include the correct entries at the top (to point to the struts 1.2 dtd) and renamed the file back to struts-config.xml.

    That seemed to work, and my project is now running with struts 1.2.

    Also, my copy of myeclipse 3.8.3 did not include the struts-nested.tld file in the ../data/1.2/tld directory. (It is included in the struts-1.2.4 zip file downloaded from the jakarta website.)

    Thanks for helping me out!

    David

    #221368 Reply

    Riyad Kalla
    Member

    David,
    I’m glad you got up and running. I will look into the missing struts-nested, issue; Thank you for pointing that out.

Viewing 6 posts - 1 through 6 (of 6 total)
Reply To: How to upgrade a project from Struts 1.1 to 1.2

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