• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

How to generate a .war file in Eclipse ?

 
rodolfo de
Greenhorn
Posts: 1
  • Mark post as helpful
  • send pies
  • 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.
 
Jeanne Boyarsky
author & internet detective
Marshal
Posts: 34843
369
Eclipse IDE Java VI Editor
  • Mark post as helpful
  • send pies
  • 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.
 
chacky boom
Greenhorn
Posts: 4
  • Mark post as helpful
  • send pies
  • 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/
 
Z Sugiarto
Ranch Hand
Posts: 58
  • Mark post as helpful
  • send pies
  • 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.

 
Bear Bibeault
Author and ninkuma
Marshal
Pie
Posts: 65120
91
IntelliJ IDE Java jQuery Mac Mac OS X
  • Mark post as helpful
  • send pies
  • 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
Author and ninkuma
Marshal
Pie
Posts: 65120
91
IntelliJ IDE Java jQuery Mac Mac OS X
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Also, please read this with regards to resurrecting old posts.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic