Here is a work around to get it working in eclipse 3.2. Get WTP plugins for eclipse. Create DynamicWebProject. The below is what the project structure will look like:
projectname --> Name of the projct in eclipse src com.yourcompname -->place your java files strut.xml web css ---> This folder contains CSS files pages ---> This folder contains JSPs WEB-INF classes --> classes, strut.xml lib --> library files libext --> library files web.xml index.jsp or index.html
The below is a build.xml which would deploy the application as war file in JBOSS. This build.xml assumes JBOSS resides in the root location. A little or no modifcation would be required in this file if need be.
<!-- deploy the application as a war file --> <target name="web.package" depends="copyfiles" description="Packages the Web classes"> <echo>Generating WAR</echo> <war warfile="${war}" webxml="${war.web.xml}"> <fileset dir="${build.dir}" includes="**" excludes="${war.web.xml}"/> </war> </target>
<target name="deploy" depends="web.package" description="Deploys WAR on Jboss Server"> <echo>Deploying struts2Proj.war</echo> <copy file="${war}" todir="${jboss.deploy.dir}" overwrite="true"/> </target>
</project>
That should be it I guess.
Note: We dont need WTP plugin for eclipse if we use WSAD (from IBM) or MyEclipse (from Genuitec). If we use MyEclipse, we dont require even the build.xml as it has a wizard option to deploy our application in exploded or packaged mode in our respective application or web servers