At 12:43 PM -0800 12/20/04, Julian wrote:
ok here is some more info.  In my subclass of
CatalogConfiguratorPlugIn, I logged any calls to
setPath or setResource.  So when the server starts the
values are never set b/c the methods are never called.
 When I harcode the value, I get an error message that
the catalog "struts" cannot be found.  This seems to
me that despite hardcoding the file path, it still is
not found.

Is anything at all being logged by your subclass of the plugin? Did you remember to call super.init(...) in your subclass? ;-)


Are you using any other plugins? Are you using set-property anywhere else? Which version of Struts are you using?

This is exceedingly strange...

Joe


-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!? Yahoo! Mail - now with 250MB free storage. Learn more. http://info.mail.yahoo.com/mail_250

---------------------------------------------------------------------
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

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



Reply via email to