Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Start Tomcat as a Windows service with Security Manager

Tags:

tomcat

To start Tomcat with Security Manager from command line, we do:

bin\catalina.bat start -security

I'm trying to do the similar for Tomcat Service which by default call without security manager:

bin\tomcat6.exe" //RS//Tomcat6

Anybody knows how to start the service with security?

like image 374
tu2012 Avatar asked Sep 19 '12 19:09

tu2012


1 Answers

I found an answer for my question: after installing Tomcat as a service, run bin\tomcat6w.exe. Under Java tab, add these 2 lines:

-Djava.security.manager 
-Djava.security.policy=[tomcat_dir]\conf\catalina.policy

If you install the service by your script, add the above lines with ++JvmOptions (see http://commons.apache.org/daemon/procrun.html)

...\Tomcat6.exe //US//Tomcat6 ++JvmOptions=-Djava.security.manager;-Djava.security.policy=...
like image 72
tu2012 Avatar answered Dec 10 '22 03:12

tu2012