You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@struts.apache.org by phpsurf <ph...@ifrance.com> on 2003/04/23 12:04:15 UTC

Custom RuleSet

Hi

I'm working with the digester, and am trying to customize the way struts-config is parsed.
So I've created my own RuleSet class that I declared in web.xml.

It works fine for new xml elements I created.

But now, I need to change the way some struts elements are created.
Let's guess I want to create ExceptionConfig objects my own way ...
For this, I guess I need to replace the ObjectCreateRule for the <exception> element.
But how to do this, as we can only add new rules ?
Is there a way to remove an existing rule ?
It looks like adding a second Creation rule for the same pattern doesn't work ...
The second creation rule seems not to be called !

thx for any ideas :)

to illustrate :
in org.apache.struts.config.ConfigRuleSet, we have :
digester.addObjectCreate 
             ("struts-config/action-mappings/action/exception", 
              "org.apache.struts.config.ExceptionConfig",
              "className");

that I would like to replace by :
digester.addObjectCreate 
             ("struts-config/action-mappings/action/exception", 
              "myExceptionConfig",
              "className");




---------------------------------------------------------------------
To unsubscribe, e-mail: struts-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: struts-user-help@jakarta.apache.org