wood burning stoves 2.0*
The moose likes Tomcat and the fly likes How to enable catalina.policy in tomcat embedded Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Murach's Java Servlets and JSP this week in the Servlets forum!
JavaRanch » Java Forums » Products » Tomcat
Bookmark "How to enable catalina.policy in tomcat embedded" Watch "How to enable catalina.policy in tomcat embedded" New topic
Author

How to enable catalina.policy in tomcat embedded

Paolo Latini
Greenhorn

Joined: Mar 08, 2012
Posts: 4
Hi! I've a big problem with catalina.policy. I've read that to start security manager is necessary the following code:%CATALINA_HOME%\bin\catalina start -security but i've a tomcat "embedded".
I've tried with System.setProperties(.....) but Tomcat run without read catalina.policy.

Can we help me?

Thanks for your answers...

Paolo
Tim Holloway
Saloon Keeper

Joined: Jun 25, 2001
Posts: 15950
    
  19

Welcome to the JavaRanch, Paolo!

Have you tried calling setSecurityProtection() on the embedded Tomcat object before starting it?


Customer surveys are for companies who didn't pay proper attention to begin with.
Paolo Latini
Greenhorn

Joined: Mar 08, 2012
Posts: 4
Hi! Thanks a lot for your answer!!!

No, i inerithed the code by an other person. He made a class named TomcatEmbedded where inside there is an object Catalina that call "the start of the server".

I think that i have to use the class "Embedded" for this method.

However i post the code (the main init() is in an other class)

Paolo Latini
Greenhorn

Joined: Mar 08, 2012
Posts: 4
My project uses Tomcat 6.0
Rob Spoor
Sheriff

Joined: Oct 27, 2005
Posts: 19649
    
  18

Paolo, could you please UseCodeTags next time? See how much easier it is to read your code with them.


SCJP 1.4 - SCJP 6 - SCWCD 5 - OCEEJBD 6
How To Ask Questions How To Answer Questions
Paolo Latini
Greenhorn

Joined: Mar 08, 2012
Posts: 4
Sorry, the next time i'll do it
 
With a little knowledge, a cast iron skillet is non-stick and lasts a lifetime.
 
subject: How to enable catalina.policy in tomcat embedded
 
Similar Threads
java.security.AccessControlException
Web container restrictions?
tomcat permissions
I need help
Tomcat Java2 Security Issue: modifyThread and modifyThreadGroup