Details
-
Type: New Feature
-
Status: Closed
-
Priority: Major
-
Resolution: Fixed
-
Affects Version/s: None
-
Fix Version/s: 1.0-beta-1
-
Component/s: None
-
Labels:None
-
Number of attachments :
Description
I have ported the old servlet and webwork support to the new pico api and webwork2. attached are two zip files, one for servlet and one for webwork2. they just need to be unpacked into the nanocontainer cvs checkout.
Quick usage howto:
components are defined in components-application.xml, components-session.xml and components-request.xml.
the format is like this:
<?xml version='1.0'?>
<container>
<component classname="org.nanocontainer.MyComponent"/>
<component classname="org.nanocontainer.MyComponent2"/>
</container>
and the web.xml needs listeners for session and application and a request filter:
<filter>
<filter-name>picorequest</filter-name>
<filter-class>org.nanocontainer.servlet.lifecycle.RequestLifecycleFilter</filter-class>
</filter>
<filter-mapping>
<filter-name>picorequest</filter-name>
<url-pattern>/*</url-pattern>
</filter-mapping>
<listener>
<listener-class>org.nanocontainer.webwork.lifecycle.ApplicationLifecycleListener</listener-class>
</listener>
<listener>
<listener-class>org.nanocontainer.servlet.lifecycle.SessionLifecycleListener</listener-class>
</listener>
then you can just define constructors for your actions that request the components it needs. I am using this for two weeks now and it works great. Please commit it to nano cvs
Activity
Field | Original Value | New Value |
---|---|---|
Attachment | servlet.zip [ 10901 ] |
Attachment | webwork2.zip [ 10902 ] |
Assignee | Aslak Hellesoy [ rinkrank ] | |
Status | Unassigned [ 1 ] | Assigned [ 2 ] |
Fix Version/s | 1.0-alpha-1 [ 10146 ] | |
Status | Assigned [ 2 ] | Closed [ 6 ] |
Resolution | Fixed [ 1 ] |
servlet support