TAGS :Viewed: 17 - Published at: a few seconds ago

[ standalone war / java web application ]

i have prepared a web application using netbeans, i want to share this with the client where he can unzip folder and has an icon to click and start using it , how can i achieve this where run time environment or anything that is required by a web application get packaged as a zip to download and run on any computer.

i have checked the below link but it doesnt help much as there is no maven used :


Answer 1

You need to use a embedded server like jetty.

  1. Create a main method.
  2. Create manifest file.
  3. Bundle them into an executable jar.

These steps are explained here.

In the main method you need to start jetty programmatically and add the wars to it.

   Server server = new Server(8088);

   WebAppContext webapp = new WebAppContext();
   webapp.setWar("location to war");



To bundle java runtime, a cleaner approach would be using JNLP.