Hi again :)

well, i wrapped the class and had it print out the
variables for the path, resource, and configResource
to the logs....well no surprise they were all null.  I
used your config below and placed the chain-config.xml
in the WEB-INF dir....root cause:
java.lang.NullPointerException.  So perhaps I do not
have the right struts-chain jar?  It is titled
struts-chain-0.5-dev.jar.  I find this
doubtful...since it seems that the properties are just
not getting set.  any ideas?  could this be some crazy
classpath issue?

Thanks again,
Julian

--- Joe Germuska <[EMAIL PROTECTED]> wrote:

> Here's one which works in my application:
> 
>    <plug-in 
>
className="org.apache.struts.chain.legacy.CatalogConfiguratorPlugIn">
>      <set-property property="path"
> value="/WEB-INF/chain-config.xml" />
>    </plug-in>
> 
> If the "path" property is set, then the file is 
> sought in the servlet context.  It sounds as 
> though you've tried this, but thought I'd give 
> you an example anyway.
> 
> if the "resource" property is set, then the file 
> is sought on the classpath, and if it's in the 
> root of a JAR or WEB-INF/classes, I'd think this 
> would work:
> 
> >  >   <plug-in
> >  >
>
>className="org.apache.struts.chain.legacy.CatalogConfiguratorPlugIn">
> >>      <set-property property="resource"
> >>  value="chain-config.xml"/>
> >>    </plug-in>
> 
> Technically, "resource" is evaluated first.
> 
> Is it possible to catch the exception and call 
> ex.getRootCause() ?  Perhaps you could write a 
> very simple subclass of CatalogConfiguratorPlugIn 
> which just catches the exception and inspects the 
> root cause?  Maybe it's a parsing error or 
> something instead of a file-not-found problem?
> 
> Joe
> 
> 
> 
> 
> At 11:34 AM -0800 12/20/04, Julian wrote:
> >btw, I have also tried the config with the
> "property"
> >attribute of the "set-property" tag set as "path"
> >instead of resource.
> >
> ><set-property property="path"...
> >
> >
> >-Julian
> >
> >--- Julian <[EMAIL PROTECTED]> wrote:
> >
> >>  Hi,
> >>
> >>  I cannot seem to load the struts-chain config
> >>  properly.  I have tried packaging it in the root
> >>  directory of my jar, placing it in
> /WEB-INF/classes,
> >>  and just in plain old WEB-INF...but to no avail.
>  I
> >>  keep getting an servletexception thrown at
> >>
>
>org.apache.struts.chain.legacy.CatalogConfiguratorPlugIn.init(CatalogConfiguratorPlugIn.java:147)
> >>    I have tried the following:
> >>
> >>    <plug-in
> >>
>
>className="org.apache.struts.chain.legacy.CatalogConfiguratorPlugIn">
> >>      <set-property property="resource"
> >>  value="/chain-config.xml"/>
> >>    </plug-in>
> >>
> >  >   <plug-in
> >  >
>
>className="org.apache.struts.chain.legacy.CatalogConfiguratorPlugIn">
> >>      <set-property property="resource"
> >>  value="chain-config.xml"/>
> >>    </plug-in>
> >  >
> >>    <plug-in
> >>
>
>className="org.apache.struts.chain.legacy.CatalogConfiguratorPlugIn">
> >>      <set-property property="resource"
> >>  value="/WEB-INF/chain-config.xml"/>
> >>    </plug-in>
> >>
> >>    <plug-in
> >>
>
>className="org.apache.struts.chain.legacy.CatalogConfiguratorPlugIn">
> >>      <set-property property="resource"
> >>  value="WEB-INF/chain-config.xml"/>
> >>    </plug-in>
> >>
> >>  Thanks in advance,
> >>  Julian
> >>
> >>  =====
> >>  Live simply so others may simply live.
> >>
> >>  -Ghandi
> >>
> >>  Pluralitas non est ponenda sine neccesitate.
> >>  "Entities should not be multiplied
> unneccesarily"
> >>
> >>  -William of Occam
> >>
> >>
> >>
> >>
> >>
> >>
> >>  __________________________________
> >>  Do you Yahoo!?
> >>  Take Yahoo! Mail with you! Get it on your mobile
> >>  phone.
> >>  http://mobile.yahoo.com/maildemo
> >>
> >>
>
>---------------------------------------------------------------------
> >>  To unsubscribe, e-mail:
> >>  [EMAIL PROTECTED]
> >>  For additional commands, e-mail:
> >>  [EMAIL PROTECTED]
> >>
> >>
> >
> >
> >=====
> >Live simply so others may simply live.
> >
> >-Ghandi
> >
> >Pluralitas non est ponenda sine neccesitate.
> >"Entities should not be multiplied unneccesarily"
> >
> >-William of Occam
> >
> >
> >
> >
> >
> >
> >__________________________________
> >Do you Yahoo!?
> >All your favorites on one personal page ñ Try My
> Yahoo!
> >http://my.yahoo.com
> >
>
>---------------------------------------------------------------------
> >To unsubscribe, e-mail:
> [EMAIL PROTECTED]
> >For additional commands, e-mail:
> [EMAIL PROTECTED]
> 
> 
> --
> Joe Germuska
> [EMAIL PROTECTED]
> http://blog.germuska.com
> "Narrow minds are weapons made for mass destruction"
>  -The Ex
> 


=====
Live simply so others may simply live. 
 
-Ghandi 
 
Pluralitas non est ponenda sine neccesitate.
"Entities should not be multiplied unneccesarily" 
 
-William of Occam




__________________________________________________
Do You Yahoo!?
Tired of spam?  Yahoo! Mail has the best spam protection around 
http://mail.yahoo.com 

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to