• 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

How to generate a .war file in Eclipse ?

 
Greenhorn
Posts: 1
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I click right button mouse and try to export my Tomcat project into Eclipse
but there is no .war option.

This .war file is important as long as I want to deploy my first web application on EATJ webhost.
 
author & internet detective
Posts: 41860
908
Eclipse IDE VI Editor Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Rodolfo,
Welcome to JavaRanch!

Eclipse doesn't support creating war files out of the box. What plugin are you using to do this or integrate with Tomcat.
 
Greenhorn
Posts: 4
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I used EATJ web hosting too. You just need go to your TOMCAT_HOME/webapps/ROOT directory and type: .

Upload the ROOT.war to your eatj tomcat server. You can use FTP or web interface to upload it. EATJ web hosting is very good. Try http://www.eatj.com/
 
Ranch Hand
Posts: 58
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

rodolfo de wrote:I click right button mouse and try to export my Tomcat project into Eclipse
but there is no .war option.

This .war file is important as long as I want to deploy my first web application on EATJ webhost.



I would suggest creating your own ant build.xml file and using the ant war task.
http://ant.apache.org/manual/CoreTasks/war.html

Generally, I would create a directory where I would assemble all the directory and files needed. This allows you to have a different file structure between development and deployment. An example of a development file structure of a web application could be as follow:



A build file can then be written to build (assemble) the above into a deployment structure, like so



After the deployment file structure is assembled (using ant) I can then archive it using the ant war task and generate something like. At this point I can also copy the change note, version, readme, and include it within the .war

project root/build/current --> projectName-version-date.war

Which can then be deployed using various ways - the easiest of which is to just copy it into an app server's deployment directory.

 
Sheriff
Posts: 67746
173
Mac Mac OS X IntelliJ IDE jQuery TypeScript Java iOS
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
"chacky boom", you have previously been warned on one or more occasions regarding adjusting your display name to meet JavaRanch standards. This is not optional. Please take a look at the JavaRanch Naming Policy and adjust your display name to match it prior to your next post.

Your display name must be a first and a last name separated by a space character, and must not be obviously fictitious.

Be aware that accounts with invalid display names are disabled.

bear
JavaRanch Sheriff
 
Bear Bibeault
Sheriff
Posts: 67746
173
Mac Mac OS X IntelliJ IDE jQuery TypeScript Java iOS
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Also, please read this with regards to resurrecting old posts.
 
reply
    Bookmark Topic Watch Topic
  • New Topic