[jira] Commented: (NANO-18) servlet support and webwork2 support

jira-yCVjj/[email protected] Mon, 22 Dec 2003 07:40:39 -0600 (CST)
Newsgroups gmane.comp.java.nanocontainer.devel
Message-ID <[email protected]>
The following comment has been added to this issue:

     Author: Mathias Bogaert
    Created: Mon, 22 Dec 2003 7:39 AM
       Body:
For people looking for documentation: http://wiki.opensymphony.com/space/PicoContainer+Integration
---------------------------------------------------------------------
View the issue:

  http://jira.codehaus.org/secure/ViewIssue.jspa?key=NANO-18


Here is an overview of the issue:
---------------------------------------------------------------------
        Key: NANO-18
    Summary: servlet support and webwork2 support
       Type: New Feature

     Status: Closed
   Priority: Major
 Resolution: FIXED

 Original Estimate: Unknown
 Time Spent: Unknown
  Remaining: Unknown

    Project: NanoContainer
   Fix Fors:
             1.0-alpha-1

   Assignee: Aslak Hellesoy
   Reporter: Christoph Sturm

    Created: Fri, 10 Oct 2003 6:26 AM
    Updated: Mon, 22 Dec 2003 7:39 AM

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


---------------------------------------------------------------------
JIRA INFORMATION:
This message is automatically generated by JIRA.

If you think it was sent incorrectly contact one of the administrators:
   http://jira.codehaus.org/secure/Administrators.jspa

If you want more information on JIRA, or have a bug to report see:
   http://www.atlassian.com/software/jira