org.apache.tomcat.modules.config
Class PolicyInterceptor
java.lang.Object
|
+--org.apache.tomcat.core.BaseInterceptor
|
+--org.apache.tomcat.modules.config.PolicyLoader
|
+--org.apache.tomcat.modules.config.PolicyInterceptor
- public class PolicyInterceptor
- extends PolicyLoader
Set policy-based access to tomcat.
Must be hooked before class loader setter.
The context will have a single protection domain, pointing to the doc root.
That will include all classes loaded that belong to the context
( jsps, WEB-INF/classes, WEB-INF/lib/
- Author:
- Glenn Nielsen, costin@dnt.ro
Methods inherited from class org.apache.tomcat.core.BaseInterceptor |
addContainer, addContext, addHandler, addSecurityConstraint, afterBody, authenticate, authorize, beforeBody, beforeCommit, contextMap, contextShutdown, contextState, engineShutdown, engineStart, engineState, engineStop, findSession, getContext, getContextManager, getDebug, getInfo, getLog, getNote, getNote, handleError, log, log, log, log, postReadRequest, postRequest, postService, postServletDestroy, postServletInit, preService, preServletDestroy, preServletInit, registerHooks, reload, removeContainer, removeContext, removeHandler, removeInterceptor, requestMap, sessionState, setContext, setContextManager, setDebug, setInfo, setNote, setNote |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
PolicyInterceptor
public PolicyInterceptor()
setSecurityManagerClass
public void setSecurityManagerClass(java.lang.String cls)
- Overrides:
setSecurityManagerClass
in class PolicyLoader
setPolicyFile
public void setPolicyFile(java.lang.String pf)
- Overrides:
setPolicyFile
in class PolicyLoader
addInterceptor
public void addInterceptor(ContextManager cm,
Context ctx,
BaseInterceptor module)
throws TomcatException
- Description copied from class:
BaseInterceptor
- Hook called when a new interceptor is added. All existing
modules will be notified of the new added module.
This hook will be called before the interceptor is initialized
( using engineInit hook )
An interceptor can add/remove other interceptors or applications,
or alter the ordering of hooks, or change/set server properties.
- Overrides:
addInterceptor
in class PolicyLoader
- Following copied from class:
org.apache.tomcat.core.BaseInterceptor
- Parameters:
cm
- the serverctx
- not null if this is a local interceptori
- the new added interceptor- Throws:
TomcatException
- The module will not be added if any
module throws an exception.
engineInit
public void engineInit(ContextManager cm)
throws TomcatException
- Set the security manager, so that policy will be used
- Overrides:
engineInit
in class BaseInterceptor
- Following copied from class:
org.apache.tomcat.core.BaseInterceptor
- Throws:
TomcatException
- The module will not be added if any
exception is thrown by engineInit.
initSecurityManager
public void initSecurityManager(ContextManager cm)
throws TomcatException
addDefaultPermissions
protected void addDefaultPermissions(Context context,
java.lang.String base,
java.security.Permissions p)
- Add a default set of permissions to the context
contextInit
public void contextInit(Context context)
throws TomcatException
- Description copied from class:
BaseInterceptor
- Notify when a context is initialized.
The first interceptor in the chain for contextInit must read web.xml
and set the context. When this method is called you can expect the
context to be filled in with all the informations from web.xml.
- Overrides:
contextInit
in class BaseInterceptor
- Following copied from class:
org.apache.tomcat.core.BaseInterceptor
- Throws:
If
- the interceptor throws exception the context will
not be initialized ( state==NEW or ADDED or DISABLED ).
Copyright © 2001 Apache Software Foundation. All Rights Reserved.