File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
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
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: 15641
    
  15

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: 19543
    
  16

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
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: How to enable catalina.policy in tomcat embedded
 
Similar Threads
Web container restrictions?
java.security.AccessControlException
I need help
tomcat permissions
Tomcat Java2 Security Issue: modifyThread and modifyThreadGroup