commons-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Gogineni, Pratima" <>
Subject Portion of configuration handled by a different processor.
Date Tue, 15 Feb 2005 01:37:09 GMT


I have a weird requirement that Im trying to figure out how to address with
the digester.

I have certain configuration files that are parsed using digester. Since our
system can wired in different ways simply by registering different handlers
the configuration files could contain different data depending on which
handler we are registering. There is some common configuration information
that is parsed irrespective of which handler is used. I would like to pass
on the handler specific configuration in the xml file to the handler itself
to evaluate  - Is it possible to do this?

To Illustrate:

<type = "com.test.handler1"/>
<extrainfo><tag1></tag1><config name="abc"/></extrainfo>

I have rules created for config1, config2 and config3 tags in digester. when
I hit the <handler> tag - I would like to instantiate com.test.Handler1 and
pass the data under extrainfo as a  "String" or "Reader" or "InputStream" to
the handler. 

It would be preferable to pass the current stream rather than a string to my
handler because i will also be processing the tags and would not like the
overhead of converting this to a string and then reparsing.


To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message