fizban
fizban

Reputation: 597

Set up Tomcat to allow users to deploy WAR files?

I'm looking for a way to set up a Tomcat 6.0 server (on Linux) such that each system user can deploy WAR applications to the server. Ideally, a user could deploy his application and access it from a url like:

http://server:8080/~user/MyApp

I've set up user directories as detailed in the Tomcat docs, and it will serve the files from each user's directory, but it doesn't seem to allow deploying WAR files to this directory.

Is there something I'm missing here, or does Tomcat just not do what I want here? And if that's the case, is there another way I might go about this? The idea is that this is a test server, and each developer can upload his build without clobbering someone else's deployed build, and preferably without requiring root access or complicated sudo setup.

Upvotes: 0

Views: 535

Answers (1)

Mark O'Connor
Mark O'Connor

Reputation: 77961

I'd recommend investigating Tomcat's manager application to deploy your war files:

  • It enables you to deploy/undeploy without restarting Tomcat (useful if the instance is being shared).
  • The documentation describes how to setup users authorized to access the manager.
  • It provides a REST API that tools like Maven's Cargo plug-in can leverage to automate deployments.

Far as I know that user dir functionality you were trying is only good for serving up content. Perhaps if the users unzip their war files it might work.

Upvotes: 2

Related Questions