• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

Problems creating the Struts 2 application, with Ant to build the application.

 
Greenhorn
Posts: 4
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi,
I am a newbie to Struts and was following the Apache Struts 2 documentation. But my process of learning halted right at the Step 2 and cant proceed further. Apache Struts 2 documentation
If you follow the link, you will see that the Step 2 mentions about Running the Ant target that creates the WAR file. I have no idea how to run the Ant target and deploy.
Basically all I want to know is to deploy a struts application on to tomcat server using Ant and eclipse. How do I do that?
 
Ranch Hand
Posts: 281
Eclipse IDE Java Windows
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Welcome to JavaRanch !

If you have "Ant" installed, use the following command where you have the "build.xml"

say your project build.xml is in C:\Documents and Settings\MyProject\
then open up the console and type ->


it should start building a "war/ear/jar" file at the given location inside your build.xml.

Hope that helps.

Happy Programming
 
Agooner kumar
Greenhorn
Posts: 4
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi Robin,
Thanks for the reply. I am using the build.xml file from the example project of Struts documentation. I was running the build.xml file as "Run As Ant Build" from Eclipse and I got the following error:

BUILD FAILED
C:\HeliosSpace\Basic_Struts2_Ant\build.xml:69: srcdir "C:\HeliosSpace\Basic_Struts2_Ant\${source.home}" does not exist!


Can you please tell me, what I am missing out here. Also it seems very few material is available on how we can deploy an application and WAR file. Any resources you can point me to would be helpful.

PS: Tried attaching the build.xml file, but I was unable to do so. Not even .txt extension.

Thanks,
AG.




 
Robin John
Ranch Hand
Posts: 281
Eclipse IDE Java Windows
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
well you can always copy / paste the contents of the xml file using Code tags in the forum if you cant attach the file.
The sample build.xml file should have all the contents that you need. The source.home property should be defined in a file called "build.properties".

and try using the command prompt instead of eclipse.. we can separate out the "ant" and "eclipse" related issues then..
 
Don't get me started about those stupid light bulbs.
reply
    Bookmark Topic Watch Topic
  • New Topic