|
|||||
|
|||||
NanoWar
OverviewNanoWar is a NanoContainer component that brings the power of PicoContainer's Dependency Injection to the Java Servlet/Web application world. Embedding NanoWar in a Web applicationNanoWar allows to embed Container in a Java Servlet container. Activation of Application and Session scope containers<listener> <listener-class>org.nanocontainer.nanowar.ServletContainerListener</listener-class> </listener> Activation of Request scope containers<filter> <filter-name>NanoWar</filter-name> <filter-class>org.nanocontainer.nanowar.ServletRequestContainerFilter</filter-class> </filter> The servlet container will instantiate these classes and send them events. When they receive events they will create containers in the proper hierarchy level and store them in the app/session/request contexts. Important! You must define a filter-mapping for the servlets that you want to create request scope containers. See NanoWar WebWork for an example. Scoped containersThe NanoWar component creates PicoContainer instances at the application, session and request level, using the following hierarchy: ![]() As illustrated in the diagram, a new PicoContainer will be instantiated every time the following happens:
Supports multiple MVC web frameworksNanoWar supports multiple Model View Controller (MVC) application frameworks: NanoWar NanoWeb - our own tiny one Please refer to the individual pages above for details on how each framework is supported to enable dependency injection using the scope PicoContainers. |
|||||
|
Copyright 2003-2006 - The Codehaus. All rights reserved unless otherwise noted.
Powered by Atlassian Confluence
|
|||||