struts-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Robert Richter <rri.t...@spree.de>
Subject Re: FBBuilder.java
Date Tue, 10 Oct 2000 09:45:52 GMT
Very fine!
For my purposes I use a simple trick to avoid fatal errors due to non-wellformedness:
extend the SAXParser and made protected method setContinueAfterFatalError public.
This way the SAXParser can be turned to accept nearly anything.
(you may also extend the parser and call setContinueAfterFatalError(true) in the constructor)

example:


     import org.apache.xerces.parsers.SAXParser;

     public class NoFatalSaxParser extends SAXParser
     {

         public void setIgnoreFatalError(boolean b)
         {
             try
             {
                 setContinueAfterFatalError(b);
             }catch(Exception e)
             {
                 System.err.println("NoFatalSaxParser.setIgnoreFatalError Exception
     \n"+e.getMessage());
             }
         }
     }

Sure, there my be better ways, but its quick and enough for internal tools.

regards,
Robert

Kevin Wang wrote:

> Here is an slightly updated version of Lacerda's FBBuilder.java for auto
> generating ActionForms (Lacerda, Wellington (AFIS)
> [Wellington.Lacerda@fao.org]).
>
> Update included ....
> - adds package name if "type" attribute specified in <struts:form>
> - adds import for ValidationActionForm
> - indentations
>
> However, I have one problem though. It requires that the input .jsp to be
> wellformed and HTML tags like <br> <img...> are causing problems. Is there
a
> way to turn off checking wellformedness?
>
> Thanks.
> Kevin
>
>   ------------------------------------------------------------------------
>                      Name: FBBuilder.java
>    FBBuilder.java    Type: Java-Quelle (application/x-unknown-content-type-JBuilder.Java)
>                  Encoding: quoted-printable

--
Robert Richter               Tech@Spree Software Technology GmbH
mailto:rri.tech@spree.de     http://www.spree.de/
Tel.:++49 (0) 30 235 520-41  Buelowstr.66
Fax.:++49 (0) 30 217 520-12  10783 Berlin



Mime
View raw message