Return-Path: Delivered-To: apmail-jakarta-tomcat-user-archive@www.apache.org Received: (qmail 1302 invoked from network); 14 Jun 2005 13:17:51 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (209.237.227.199) by minotaur.apache.org with SMTP; 14 Jun 2005 13:17:51 -0000 Received: (qmail 99773 invoked by uid 500); 14 Jun 2005 13:17:34 -0000 Delivered-To: apmail-jakarta-tomcat-user-archive@jakarta.apache.org Received: (qmail 99756 invoked by uid 500); 14 Jun 2005 13:17:33 -0000 Mailing-List: contact tomcat-user-help@jakarta.apache.org; run by ezmlm Precedence: bulk List-Unsubscribe: List-Help: List-Post: List-Id: "Tomcat Users List" Reply-To: "Tomcat Users List" Delivered-To: mailing list tomcat-user@jakarta.apache.org Received: (qmail 99743 invoked by uid 99); 14 Jun 2005 13:17:33 -0000 X-ASF-Spam-Status: No, hits=0.0 required=10.0 tests= X-Spam-Check-By: apache.org Received-SPF: pass (hermes.apache.org: local policy) Received: from mail.schoenhaber.de (HELO mail.schoenhaber.de) (217.140.77.184) by apache.org (qpsmtpd/0.28) with ESMTP; Tue, 14 Jun 2005 06:17:29 -0700 Received: from gimli.schoenhaber.de (gimli.schoenhaber.de [IPv6:2001:4b88:1016:42:20c:76ff:fe20:8e24]) by mail.schoenhaber.de (Postfix) with ESMTP id 13572501B8CA for ; Tue, 14 Jun 2005 15:17:08 +0200 (CEST) From: Markus =?iso-8859-1?q?Sch=F6nhaber?= Reply-To: tomcat-user@jakarta.apache.org To: "Tomcat Users List" Subject: Re: starting a binary by calling a servlet Date: Tue, 14 Jun 2005 15:17:07 +0200 User-Agent: KMail/1.8.1 References: <200506131601.57880.stalp@imbei.uni-mainz.de> <200506131624.37386.mailing-tomcat-user@schoenhaber.de> <200506141427.14312.stalp@imbei.uni-mainz.de> In-Reply-To: <200506141427.14312.stalp@imbei.uni-mainz.de> MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 8bit Content-Disposition: inline Message-Id: <200506141517.07547.mailing-tomcat-user@schoenhaber.de> X-Virus-Checked: Checked X-Spam-Rating: minotaur.apache.org 1.6.2 0/1000/N Am Dienstag, 14. Juni 2005 14:27 schrieb Christian Stalp: > > Ein grant-Eintrag im Policy-File k�nnte dann so aussehen: > > > > grant codeBase "file:${catalina.home}/webapps/my_exec/-" { > > � � permission java.io.FilePermission " > Programm>", "execute"; > > }; > > And the "/my_exec/-", is that the context-path? Yes. > That means I can call my Servlet whatever I want, but I have to put it into > a package called my_exec.WAR ? Is that correct? Well, kind of. The trailing "-" in the path specification above means: grant that right to all files in this directory and all subdirectories thereof. So, as a result, the name of your servlet really doesn't matter, since it resides somewhere in (a subdirectoy of) the webapp-directory. But better to see it just the other way round: you don't adopt your webapp to match the configuration parameter but the configuration parameter to match the webapp. Example: the servlet that shall be able to execute an external binary is contained a webapp named "My1stWebApp" which is placed at the default location (i. e. the location tomcat's default configuration specifies). The path to your webapp's directory will therefore be ${catalina.home}/webapps/My1stWebApp and the configuration parameter grant codeBase "file:${catalina.home}/webapps/My1stWebApp/-" ... If you have for example placed your webapp in /some/strange/dir/mywebapps/My1stWebApp the entry in catalina.policy should the read grant codeBase "file:/some/strange/dir/mywebapps/My1stWebApp/-" ... Regards mks --------------------------------------------------------------------- To unsubscribe, e-mail: tomcat-user-unsubscribe@jakarta.apache.org For additional commands, e-mail: tomcat-user-help@jakarta.apache.org