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 :
http://www.javacodegeeks.com/2012/11/standalone-web-application-with-executable-tomcat.html
You need to use a embedded server like jetty .
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");
webapp.setContextPath("/contextpath");
server.setHandler(webapp);
server.start();
EDIT:
To bundle java runtime, a cleaner approach would be using JNLP .
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.