|
|||||||||||
| 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.Servlet22Broker
An implementation of Broker tailored for Servlet 2.2 environments. Loads templates and other resources from the servlet context (WAR file), writes log messages to the servlet log, and loads properties from the WAR file context parameters.
| Field Summary | |
protected java.lang.ClassLoader |
_servletClassLoader
|
protected java.lang.String |
_templatePrefix
|
| Fields inherited from class org.webmacro.servlet.ServletBroker |
_servletContext |
| Fields inherited from class org.webmacro.Broker |
_config, _log, _ls, _myClassLoader, _name, _prof, _propertyOperators, _providers, _systemClassLoader, BROKERS, SETTINGS_PREFIX, WEBMACRO_DEFAULTS, WEBMACRO_PROPERTIES |
| Constructor Summary | |
protected |
Servlet22Broker(javax.servlet.ServletContext sc,
java.lang.ClassLoader cl)
Creates the broker looking in WEB-INF first for WebMacro.properties before looking in the application root. |
| Method Summary | |
java.lang.Class |
classForName(java.lang.String name)
Loads a class by name. |
static Broker |
getBroker(javax.servlet.Servlet s)
|
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 |
java.net.URL |
getTemplate(java.lang.String name)
Get a template; kind of like getting a resource, but might come from a different place |
protected void |
init()
Constructors should call this after they've set up the properties to set up common things like profiling, providers, etc. |
protected void |
loadServletSettings(java.lang.String prefix)
|
| Methods inherited from class org.webmacro.servlet.ServletBroker |
getServletContext, initLog |
| Methods inherited from class org.webmacro.Broker |
addProvider, findBroker, get, getBooleanSetting, getBroker, getBroker, getBrokerLocal, getClassLoader, getEvaluationExceptionHandler, getFastWriter, getFunction, getIntegerSetting, getIntegerSetting, getLog, getLog, getName, getProvider, getSetting, getSettings, getValue, initLog, loadDefaultSettings, loadSettings, loadSystemSettings, main, newProfile, putFunction, register, setBrokerLocal, setEvaluationExceptionHandler, shutdown, startClient, stopClient, toString |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Field Detail |
protected final java.lang.ClassLoader _servletClassLoader
protected java.lang.String _templatePrefix
| Constructor Detail |
protected Servlet22Broker(javax.servlet.ServletContext sc,
java.lang.ClassLoader cl)
throws InitException
| Method Detail |
protected void loadServletSettings(java.lang.String prefix)
throws InitException
InitException
protected void init()
throws InitException
Broker
init in class BrokerInitException
public static Broker getBroker(javax.servlet.Servlet s)
throws InitException
InitExceptionpublic java.net.URL getResource(java.lang.String name)
getResource in class Brokerpublic java.io.InputStream getResourceAsStream(java.lang.String name)
getResourceAsStream in class Brokerpublic java.net.URL getTemplate(java.lang.String name)
getTemplate in class Broker
public java.lang.Class classForName(java.lang.String name)
throws java.lang.ClassNotFoundException
classForName in class Brokerjava.lang.ClassNotFoundException
|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||