views:

319

answers:

5

Hi,

In my job we have to deploy an application on various environments. It's a standard WAR file which needs a bit of configuration, deployed on Tomcat 6.

Is there any way of creating a 'deployment package' with Tomcat so that you just extract it and it sets up Tomcat as well as your application? I'm not sure that creating a .zip file with the Tomcat folder would work! It certainly wouldn't install the service.

Suggestions welcome!

I should note that - at the moment - all apps are deployed on Windows servers.

Thanks, Phill

A: 

One option would be to use embedded Winstone servlet container instead of Tomcat as described here: http://winstone.sourceforge.net/#embedding

Then you would have executable jar file running your application.

Vilmantas Baranauskas
While very nice and easily packageable the winstone servlet engine has a smaller featureset than Tomcat has -- check out http://winstone.sourceforge.net/#whatIs to see if it fits your needs.
Simon Groenewolt
+1  A: 

You could probably modify the installer that Tomcat itself uses.

Simply zipping up the directory is a valid solution, but as you note, it will not install the service.

I would probably (a) zip up the directory (b) use one of the open-source service registry programs to install the server and maybe (c) uses NSIS to build an installer.

Depending on the installation environment, your installer may also need to ask the user for a server port, since your application may not be able to use the default HTTP port.

Noel Grandin
+1  A: 

We use Ant Installer to deploy our application, app server and install it as a service. We embed Java Service Wrapper in the installer to install the Windows service.

Kevin
Marking this as the accepted answer because it's probably what we're going to use - other answers would probably work as well though!
Phill Sacre
A: 

It's commercial, but install4j will do this for you, including installing the service.

pjz
A: 

You could use BitRock crossplatform installer. You can take a look at BitNami for a number of Java applications like Alfresco, JRoller, and Liferay that have been packaged using BitRock. The BitNami stacks are completely free, though Bitrock itself is a commercial tool (we have free licenses for open source projects)

Daniel Lopez