Return-Path: Delivered-To: apmail-tomcat-users-archive@www.apache.org Received: (qmail 57821 invoked from network); 16 Aug 2009 16:10:27 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.3) by minotaur.apache.org with SMTP; 16 Aug 2009 16:10:27 -0000 Received: (qmail 24261 invoked by uid 500); 16 Aug 2009 16:10:30 -0000 Delivered-To: apmail-tomcat-users-archive@tomcat.apache.org Received: (qmail 24168 invoked by uid 500); 16 Aug 2009 16:10:29 -0000 Mailing-List: contact users-help@tomcat.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: "Tomcat Users List" Delivered-To: mailing list users@tomcat.apache.org Received: (qmail 24151 invoked by uid 99); 16 Aug 2009 16:10:29 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Sun, 16 Aug 2009 16:10:29 +0000 X-ASF-Spam-Status: No, hits=-2.8 required=10.0 tests=RCVD_IN_DNSWL_MED,SPF_NEUTRAL X-Spam-Check-By: apache.org Received-SPF: neutral (nike.apache.org: 128.253.83.141 is neither permitted nor denied by domain of dns4@cornell.edu) Received: from [128.253.83.141] (HELO authusersmtp.mail.cornell.edu) (128.253.83.141) by apache.org (qpsmtpd/0.29) with ESMTP; Sun, 16 Aug 2009 16:10:18 +0000 Received: from [192.168.5.101] (cpe-67-244-39-127.twcny.res.rr.com [67.244.39.127]) (authenticated bits=0) by authusersmtp.mail.cornell.edu (8.13.1/8.12.10) with ESMTP id n7GG9u3s001962 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO) for ; Sun, 16 Aug 2009 12:09:56 -0400 (EDT) Message-ID: <4A882F53.4070701@cornell.edu> Date: Sun, 16 Aug 2009 12:09:55 -0400 From: David Smith User-Agent: Thunderbird 2.0.0.22 (Windows/20090605) MIME-Version: 1.0 To: Tomcat Users List Subject: Re: How do I set an option for a specific servlet if Tomcat is running as a service? References: In-Reply-To: X-Enigmail-Version: 0.96.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit X-Virus-Checked: Checked by ClamAV on apache.org Aaron Aberg wrote: > Hi, > > I'm using Linux CentOS with Plesk 9.2.1, Tomcat 5.5 and Solr 1.3.0. I > installed the solr war file through the plesk control panel but it > doesnt start up. The logs reveal that solr/home property needs to be > set before it can be started up. After some googling, I found out that > I could set the property in web.xml in the war file. This didn't seem > to work for me. > > When I was first playing with solr, it was on a Windows machine and > its very simple to set this property. You can do it through the tomcat > service system tray application. However, I am using Linux now and I > believe that I need to set this option in JAVA_OPTS. I have seen a > bunch of examples where someone will export the variable etc and then > run the catalina.sh command. I can't do that. I need to start and stop > the service via plesk. > > This is what I'm thinking. I see in /etc/passwd that the tomcat user > has a default path of /usr/share/tomcat5. I'm wondering if I could put > a .bashrc file in that directory and set the option there. Would that > work? Does anyone have an idea as to how I can solve this problem? > > By the way the option should be something like: > JAVA_OPTS=-Dsolr.solr.home='/usr/share/tomcat5/solr' > > Thanks in advance, > Aaron > > --------------------------------------------------------------------- > To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org > For additional commands, e-mail: users-help@tomcat.apache.org > > So ... what I'm reading is you are starting tomcat as a service. In that case, there should be a script in /etc/init.d for starting/stopping tomcat. Take a look at that. If the settings aren't in there, the script may have comments pointing you in the right direction. I don't think the .bashrc will work because the tomcat account is probably disabled. That's the way all accounts used by linux/unix services are for security reasons. There is no interactive login to run a .bashrc file from when tomcat starts or stops. --David --------------------------------------------------------------------- To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org For additional commands, e-mail: users-help@tomcat.apache.org