Hi Pat,

Mmmmmmm ..... this class 
com.opensymphony.webwork.lifecycle.ApplicationLifecycleListener 
has loadConfiguration() which explicitly call for "components.xml"
------------------------------------------------------
    public void contextInitialized(ServletContextEvent event) {
        ServletContext application = event.getServletContext();
        ComponentManager container = new DefaultComponentManager();
        ComponentConfiguration config = loadConfiguration();

        config.configure(container, "application");

        application.setAttribute("DefaultComponentManager", container);
        application.setAttribute("ComponentConfigration", config);
    }

    private ComponentConfiguration loadConfiguration() {
        try {
            ComponentConfiguration config = new ComponentConfiguration();
            InputStream configXml = Thread.currentThread
().getContextClassLoader().getResourceAsStream("components.xml");

            config.loadFromXml(configXml);

            return config;
        } catch (Exception e) {
            String message = "Cannot load components.xml configuration";
            log.error(message, e);
            throw new RuntimeException(message);
        }
    }
------------------------------------------------------------------

I suppose commenting out the following line from web.xml is out of 
question?
---------
    <listener>
        <listener-
class>com.opensymphony.webwork.lifecycle.ApplicationLifecycleListener</lis
tener-class>
    </listener>
---------

I get around it by providing a dummy components.xml file where it only 
has a root node with nothing in between. It works that way.


cheers,
/bernard




> Nope, the components stuff is totally optional. This will be made very 
clear
> in the upcoming documentation :)
> 
> -Pat
> 
> ----- Original Message -----
> From: <[EMAIL PROTECTED]>
> To: <[EMAIL PROTECTED]>
> Sent: Sunday, March 16, 2003 10:19 PM
> Subject: [OS-webwork] Is component.xml compulsory?
> 
> 
> > Hi all,
> >
> > I am playing with WebWork 2.0, which I intend to used for my up coming
> > proj.
> >
> > Quick question: is the components.xml file must be included? what if I
> > don't use it?
> >
> > I saw it in the sample which comes with ww 2.0.
> >
> > When I tried to deploy my simple sample, eliminating the 
components.xml,
> > tomcat (4.1.18) complained, saying: "... Cannot load components.xml
> > configuration ..." complaining about InputStream cannot be null, 
throwing
> > IllegalArgumentException.
> >
> > Yes, I also removed (commented out) the components entry in xwork.xml
> > file.
> >
> > Anyone shed me light? Thanks.
> >
> > cheers,
> > /bernard
> >
> > ----------------------------------------
> > This message was sent using CBN WebMail.
> >
> >
> >
> >
> > -------------------------------------------------------
> > This SF.net email is sponsored by:Crypto Challenge is now open!
> > Get cracking and register here for some mind boggling fun and
> > the chance of winning an Apple iPod:
> > http://ads.sourceforge.net/cgi-bin/redirect.pl?thaw0031en
> > _______________________________________________
> > Opensymphony-webwork mailing list
> > [EMAIL PROTECTED]
> > https://lists.sourceforge.net/lists/listinfo/opensymphony-webwork
> 
> 
> 
> -------------------------------------------------------
> This SF.net email is sponsored by:Crypto Challenge is now open! 
> Get cracking and register here for some mind boggling fun and 
> the chance of winning an Apple iPod:
> http://ads.sourceforge.net/cgi-bin/redirect.pl?thaw0031en
> _______________________________________________
> Opensymphony-webwork mailing list
> [EMAIL PROTECTED]
> https://lists.sourceforge.net/lists/listinfo/opensymphony-webwork
> 


----------------------------------------
This message was sent using CBN WebMail.




-------------------------------------------------------
This SF.net email is sponsored by:Crypto Challenge is now open! 
Get cracking and register here for some mind boggling fun and 
the chance of winning an Apple iPod:
http://ads.sourceforge.net/cgi-bin/redirect.pl?thaw0031en
_______________________________________________
Opensymphony-webwork mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/opensymphony-webwork

Reply via email to