On Tue, 19 Jun 2001, See Yam Lim wrote:

> Hey guys,
> 
>       Does anybody know how to register a DTD in struts application. i had
> call overwrite the "registrations[]" string array inside my ActionServlet.
> and in my ActionServlet's init() mehtod, i had called super.init() then a
> callback to initServlet in turn calling digester.register() to resgister
> DTD. but it did recoganize the DTD.
> 

You might also consider overriding initDigester() instead, along these
lines:

  protected Digester initDigester(int detail) {

    Digester digester = super.initDigester(detail);
    for (int i = 0; i < myRegistrations.length; i+= 2) {
      ... add some additional registrations like initDigester does ...
    }
    return digester;

  }

There is no requirement that all the registrations have to be done at
once, or come from the same array -- as long as you register DTDs before
you call parse() you will be fine.

> Have anyone done this before? Please help!  
> 
> See-Yam Lim
> Software Engineer
> Netvendor Inc.
> http://www.netvendor.com
> mailto:[EMAIL PROTECTED]
> Sell more profitably. 
> 
> 
> 
> 

Craig


Reply via email to