You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@struts.apache.org by Joe Germuska <Jo...@Germuska.com> on 2003/03/18 17:35:16 UTC
Base PlugIn implementation?
I find myself using PlugIns all over the place, and I was wondering
if there'd be any interest in adding a base implementation to the
Struts distribution.
I have an abstract class I extend which works on the assumption that
you want to digest an XML config file from some resource and put it
into the application context. The base class has three properties:
"key" (arbitrary string)
"configSource" (one of "classpath," "file," or "servlet")
"configPath" (arbitrary string which resolves to a resource using
"configSource")
The abstract class just provides support methods to open an
InputStream using configPath and configSource. I've been extending
the base class and initializing a Digester using those support
methods and then placing the result of the Digester parse into
Application scope under "key." However, it would be trivial to add
properties for configuring the Digester from XML or from RuleSet
class implementations and roll all of that into the base's init
method. At that point it wouldn't even need to be an abstract class
anymore.
Would this be something people would find useful enough that I should
share it? Or has everyone who uses PlugIns already done something
like it?
Joe
--
--
Joe Germuska
Joe@Germuska.com
http://blog.germuska.com
"If nature worked that way, the universe would crash all the time."
--Jaron Lanier
---------------------------------------------------------------------
To unsubscribe, e-mail: struts-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: struts-dev-help@jakarta.apache.org