Installer for web application
We have developed a web application which is to be dep开发者_运维技巧loyed by nontechnical person. Therefor I want to create an installer for it. Installer has functions of installing JVM, Apache Tomcat, and the web application war file depending on whether they are installed or not. Is there any installation suit which I can use to achieve this?
If you're aiming for a linux platform the best way to do this would be to create packages (rpm or deb) with dependencies for the jvm and tomcat.
The Winstone Project supports executable WAR files (with the Servlet Container and your web application embedded in the executable jar), which takes you half-way (still need to install Java).
To use this, simply unpack the winstone JAR, and place your WAR file inside the unpacked folder at the top level (with the same parent as the folder named "winstone"). Then rename your WAR file to "embedded.war", and repack the jar as before (make sure to preserve the META-INF and manifest).
Now if you type: "java -jar winstone.jar", your application should automatically deploy as the ROOT web application. Try http://localhost:8080/ to check it out.
If you need to add any default command-line arguments (eg ports or prefixes), you can embed a properties file in exactly the same way, except that the file must be named "embedded.properties".
Maybe this can be combined with one of the tools that creates installers out of jar files.
精彩评论