views:

1419

answers:

4

I have web application written in java using Eclipse. It has just one servlet that does some file manipulations. How do I build war file so I can easily deploy it to my remote server.

+3  A: 

Right-click on the project, select 'Export...', then choose web -> WAR.

Jesse
Awesome!!! It workssss... Actually Eclipse is better than Netbeans (in some ways) :D
Maksim
+3  A: 

You should be able to use Maven to package a WAR to deploy to your remote server. It looks a little daunting, but once you create your own WAR file you should be ok, check out:

http://maven.apache.org/plugins/maven-war-plugin/usage.html

In fact you should be able to manage deployment using the Maven Glassfish plugin here:

https://maven-glassfish-plugin.dev.java.net/

That will allow you to start,stop,deploy,undeploy etc... your web app. Example here:

https://maven-glassfish-plugin.dev.java.net/examples/complete.html

Jon
+1  A: 

Just for the record,

  • The default build artifact for a NetBeans Web project is a war
  • The default build artifact for a simple Java project is a jar
Yeah... That's why I love NetBeans but I have to learn and user Eclipse for work.
Maksim
A: 

I have checked all the links above and googled for quite a while, I have not been able to do anything with remote glassfish installations. Any clue is greatly appreciated.

kamal