tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Markus Schönhaber <>
Subject Re: starting a binary by calling a servlet
Date Tue, 14 Jun 2005 13:17:07 GMT
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 "<Pfad zum aszuführenden
> > Programm>", "execute";
> > };
> And the "/my_exec/-", is that the context-path?


> 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
and the configuration parameter
grant codeBase "file:${catalina.home}/webapps/My1stWebApp/-" ...
If you have for example placed your webapp in
the entry in catalina.policy should the read
grant codeBase "file:/some/strange/dir/mywebapps/My1stWebApp/-" ...


To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message