|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.webmacro.Broker
org.webmacro.servlet.ServletBroker
org.webmacro.servlet.Servlet20Broker
An implementation of Broker tailored for Servlet 2.0/2.1 environments.
Loads templates and other resources from:
Nested Class Summary |
Nested classes inherited from class org.webmacro.servlet.ServletBroker |
ServletBroker.PropertiesPair |
Field Summary | |
protected java.lang.ClassLoader |
_servletClassLoader
|
Fields inherited from class org.webmacro.servlet.ServletBroker |
_servletContext |
Fields inherited from class org.webmacro.Broker |
_config, _log, _ls, _myClassLoader, _name, _propertyOperators, _providers, _systemClassLoader, BROKERS, SETTINGS_PREFIX, WEBMACRO_DEFAULTS, WEBMACRO_PROPERTIES |
Constructor Summary | |
protected |
Servlet20Broker(javax.servlet.ServletContext sc,
java.lang.ClassLoader cl,
java.util.Properties additionalProperties)
|
Method Summary | |
protected static Broker |
_getBroker(javax.servlet.ServletContext sc,
java.lang.ClassLoader cl,
java.util.Properties additionalProperties,
boolean fromServlet,
java.lang.String servletOrContextName)
Get an existing instance of the Servlet 2.0/2.1 broker or create a new one. |
java.lang.Class |
classForName(java.lang.String name)
Loads a class by name. |
static Broker |
getBroker(javax.servlet.ServletContext sc,
java.lang.ClassLoader cl,
java.util.Properties additionalProperties)
Get a Servlet API 2.0 compatible broker for the ServletContext specified |
static Broker |
getBroker(javax.servlet.Servlet s,
java.util.Properties additionalProperties)
Get a Servlet API 2.0 compatible broker for the Servlet specified |
java.net.URL |
getResource(java.lang.String name)
Get a resource (file) from the the Broker's class loader |
java.io.InputStream |
getResourceAsStream(java.lang.String name)
Get a resource (file) from the Broker's class loader |
Methods inherited from class org.webmacro.servlet.ServletBroker |
getBroker, getServletContext, initLog |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Field Detail |
protected java.lang.ClassLoader _servletClassLoader
Constructor Detail |
protected Servlet20Broker(javax.servlet.ServletContext sc, java.lang.ClassLoader cl, java.util.Properties additionalProperties) throws InitException
Method Detail |
public static Broker getBroker(javax.servlet.Servlet s, java.util.Properties additionalProperties) throws InitException
s
- The servletadditionalProperties
-
InitException
public static Broker getBroker(javax.servlet.ServletContext sc, java.lang.ClassLoader cl, java.util.Properties additionalProperties) throws InitException
sc
- The Servlet contextcl
- A ClassLoader to use, presumably the webapp classloaderadditionalProperties
-
InitException
protected static Broker _getBroker(javax.servlet.ServletContext sc, java.lang.ClassLoader cl, java.util.Properties additionalProperties, boolean fromServlet, java.lang.String servletOrContextName) throws InitException
sc
- The ServletContext to template accesscl
- The ClassLoader for class loading, typically servlet or
JSP page's class loaderadditionalProperties
- fromServlet
- true if it is actually an initialization derived from
a Servlet instance passed in - just for nicer logging outputservletOrContextName
- Name of the servlet or context originating this broker,
for nicer logging
InitException
public java.net.URL getResource(java.lang.String name)
getResource
in class Broker
public java.io.InputStream getResourceAsStream(java.lang.String name)
getResourceAsStream
in class Broker
public java.lang.Class classForName(java.lang.String name) throws java.lang.ClassNotFoundException
classForName
in class Broker
java.lang.ClassNotFoundException
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |