java.lang.Object
net.i2p.router.web.WebAppConfiguration
- All Implemented Interfaces:
Configuration
Adds to the webapp classpath as specified in
webapps.config. This allows us to reference classes that are not in the classpath specified in wrapper.config, since old installations have individual jars and not lib/*.jar specified in wrapper.config. A sample line in webapps.config is: webapps.appname.classpath=foo.jar,$I2P/lib/bar.jar Unless $I2P is specified the path will be relative to $I2P/lib for webapps in the installation and appDir/plugins/appname/lib for plugins.
webapps.config is used because setting Class-Path in MANIFEST.MF does not work for jetty wars, and because WebAppContext.addClassPath() is not usable here. Jars that are already on the system class path are skipped to avoid duplicate statics; /susimail is the exception.
Nested Class Summary
Nested classes/interfaces inherited from interface Configuration
Configuration.ClassListField Summary
Fields inherited from interface Configuration
ATTRConstructor Summary
ConstructorsConstructorDescriptionconfigure(WebAppContext)takes the WebAppContext it is configuring as an argument, so a bare instance is how Jetty creates it.Method Summary
All MethodsModifier and TypeMethodDescriptionvoidcloneConfigure(WebAppContext template, WebAppContext context) Apply the same settings to a cloned webapp.voidconfigure(WebAppContext context) Apply I2P security settings to the webapp.voiddeconfigure(WebAppContext context) Jetty 7 Configuration hook.voiddestroy(WebAppContext context) Jetty 7 Configuration hook.voidpostConfigure(WebAppContext context) Jetty 7 Configuration hook.voidpreConfigure(WebAppContext context) Jetty 7 Configuration hook.
Constructor Details
WebAppConfiguration
public WebAppConfiguration()configure(WebAppContext)takes the WebAppContext it is configuring as an argument, so a bare instance is how Jetty creates it.
Method Details
deconfigure
Jetty 7 Configuration hook. Nothing to undo - this configuration only adjusts the class path, which Jetty owns.- Specified by:
deconfigurein interfaceConfiguration
configure
Apply I2P security settings to the webapp.- Specified by:
configurein interfaceConfiguration- Throws:
Exception
cloneConfigure
Apply the same settings to a cloned webapp.- Specified by:
cloneConfigurein interfaceConfiguration
destroy
Jetty 7 Configuration hook. Nothing to destroy - this configuration holds no resources.- Specified by:
destroyin interfaceConfiguration
preConfigure
Jetty 7 Configuration hook. Runs beforeconfigure(WebAppContext)with no class path work to do, so this is an intentional no-op.- Specified by:
preConfigurein interfaceConfiguration
postConfigure
Jetty 7 Configuration hook. Runs afterconfigure(WebAppContext)with no follow-up work, so this is an intentional no-op.- Specified by:
postConfigurein interfaceConfiguration