2 Replies Latest reply on Mar 5, 2006 5:47 AM by Holger Schoenen

    Developing Struts in Eclipse 3.x in JBOSS

    maruthi ravuri Newbie

      How to develop Struts in Eclipse 3.x? Can anybody suggest the right plug in and configuration istructions?

      Thanks,
      Maruthi.

        • 1. Re: Developing Struts in Eclipse 3.x in JBOSS
          Burr Sutter Master

          I'm not aware of any Struts specific documentation as part of the JBoss IDE. However, consider these steps for getting Struts working in the world of JBoss IDE with JBoss AppServer (I've been working on this myself this weekend!).
          - Note: these steps assume you have successfully worked through the Fibonacci Tutorial
          (http://docs.jboss.com/jbosside/tutorial/build/en/pdf/JBossIDE-Tutorial.pdf) Plus, this is not necessarily the best way to handle this but I was able to make it work using the tutorial and struts-blank as my source of inspiration. Caveat - I have recent history with IBM RAD 6.0 as my Java IDE so I'm a novice with raw Eclipse (RAD is based on Eclipse).

          - download and unzip the Struts binaries (struts-1.2.8-bin.zip) from struts.apache.org
          - find a file called struts-blank.war (under the webapps directory)
          - unzip (winzip can crack a EAR, WAR and JAR) it into a temp location
          - in the IDE create a new J2ee 1.4 project
          - add a lib folder and throw in the JAR files from struts-blank WEB-INF\lib
          - add docroot folder and throw in the index.jsp
          - add a subdirectory called "pages" and pull in the welcome.jsp
          - add a new source folder called "src"
          - copy MessageResources.properties there
          - create a sub-folder called "WEB-INF" under src and copy all the .xml and .tld files from struts-blank
          - right-click on the project, select properties and highlight Packaging Configurations
          - following a similiar technique found in the Fibonacci Tutorial, add an archive called MyStruts.war - check the Exploded check-box
          - right-click on MyStruts.war and select Add Folder and add the lib folder with a prefix of /WEB-INF/lib
          - Add Folder - docroot no prefix
          - Add Folder - src/WEB-INF with the prefix of /WEB-INF
          - Add File - MessageResources.properties with the prefix of /WEB-INF/classes
          - Select OK and right-click on the project and select Run Packaging
          - If everything comes out successfully you should have a MyStruts.war folder in the same directory as the project that should have nearly identical to the structure to struts-blank (the unzipped WAR file found in the Struts binaries).
          - You then setup the deployment/debug preferences following the instructions in the Tutorial so you can deploy to JBoss AS.
          - then hit your browser with http://localhost:8080/ProjectName/Index.jsp
          and you should get the welcome message from Welcome.jsp + MessageResources.properties


          Burr

          • 2. Re: Developing Struts in Eclipse 3.x in JBOSS
            Holger Schoenen Newbie

            ok. But how can I build the web.xml with JBoss-eclips-ide?

            I have to include the struts taglibs (there are more than only one!) The way is to merge file taglibs.xml. But there I get an XML syntax check (no WFF) as there is no root element for the tagib definitions (more han 1)!

            Manully I can correct it, but this is anoying.

            -Holger