Create war file eclipse

Create war file eclipse

This tutorial will show you how to create war file eclipse or if you want to export war file in eclipse to deploy on server.

Below are needed:

  • Eclipse ( We are using eclipse Kepler. You could also download eclipse from here eclipse.org/downloads)

Please follow below steps:

Step 1: Create dynamic hello world web project in eclipse name: DynamicWebProject (Please use this link if you are not sure how to create maven project in eclipse: Create Dynamic web project Hello World Eclipse). Project structure should look same as below

Create war file eclipse

Step 2: Now right click project –> Export

Create war file eclipse

Step 3: Select Web –> WAR file from Select window then click Next

Create war file eclipse

Step 4: Click browse to choose destination of war file (give file name of your choice and Save as type war)

Create war file eclipse

Step 6: Optionally you could choose below as well based on your choice

  • Target runtime: We have weblogic server configure that’s why it shows Optimize for a specific server runtime. It will show you your configure server in drop down if any otherwise will be blank
  • Pro-compile JSP file –Optional choice
  • Export source files – If you to export source file as well with war file (Usually it’s not recommended to include source file in war file)
  • Overwrite existing file: Check this box if you want to overwrite existing file ( Recommendation is checked this box)
  • Once all done click Finish button

Create war file eclipse

Step 7: Now go to your saved location you will see war file got created

Dynamically generate PDF using servlet Download Sample WAR file

That’s it create war file eclipse done successfully.

Leave a Reply

Your email address will not be published. Required fields are marked *