Server Fault is a question and answer site for system and network administrators. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

We're developing a web-app running under tomcat which relies on Java User preferences to store all kind of settings. That works great, but we've run into problem where we needed to set up another staging web-app which allows you to test settings before settings them live.

The core of the problem lies in the fact that Java User preferences are the same for all web-app due to the fact that all of them run under the tomcat user (configurable). For legacy reasons I can not at the moment change my preferences structure, so I'm hoping for a solution on the the tomcat configuration side.

Is it possible to designate a different user credentials for a specific web-app in tomcat?

Thanks, Boaz

share|improve this question
What do you mean by "Java user preferences?" Environment variables? – Ernest Mueller May 18 '10 at 21:59
up vote 4 down vote accepted

I don't believe you can make separate apps run as different users in Tomcat. You have a couple choices. You could just install a second tomcat on the same box/different directory and run it on another port; then you don't have any dependency problems. Or, you may be able to override whatever the settings are you're talking about.

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.