I have developed Java Servlet on Netbeans IDE and now wish to deploy them on Amazon EC2. For deploying Java Servlets to Amazon EC2, I need to convert them to .WAR file. Now Netbeans 7.0 automatically converts Java Servlets into .WAR files in Files/dist folder.
My Question is should I use WAR file from Netbeans or should I use Maven to build a WAR files. (I don’t know how to use Maven). Also I don’t need lot of files auto-generated by Netbeans. For example files in folder Web Pagesso which approach will be optimal and best practice.
I have read the faq and feel this question will fall in the category of software tools commonly used by programmers.
Was your project generated by maven initially? If yes then use maven otherwise no need to do it. If you’re using Tomcat as servlet container you can write ant script which will deploy war file to your remote host. In all other cases you can directly copy and paste war file to server.