How to Export WAR file from Eclipse to Tomcat


To export WAR file from the Dynamic Web Project in Eclipse, Follow below steps:

Export WAR File
Export WAR File

Java – Download Free EBooks and Whitepapers

Now select the destination where you want to deploy the WAR file; in our case, it will be Tomcat‘s “webapps” directory.

Select Destination to Deploy WAR file
Select Destination to Deploy WAR file

If you want to maintain source files (.java) then click on export source files as well.

Select Destination to Deploy WAR file
Select Destination to Deploy WAR file

Now verify the webapps directory in Tomcat’s distribution folder.

webapps directory in Tomcat's distribution folder
webapps directory in Tomcat’s distribution folder

Lets run the Web Application and verify

Run Tomcat, and you will notice that the WAR file content will be extracted into the folder

Once tomcat is Up and Running, Open Browser and open the URL http://localhost:8080/JavaWebProject/HelloWorldExample, you will see

Successful Servlet Execution in Tomcat Server in Browser
Successful Servlet Execution in Tomcat Server in Browser

Done!!! šŸ™‚

Other Interesting Tomcat related Articles:

Advertisements

11 thoughts on “How to Export WAR file from Eclipse to Tomcat”

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s