Thank you. OK, I understand, that if JSP is good, then no problem.

"Deadman, Hal" wrote:

> I am not sure what you are looking for. The component library comes with
> examples including a struts-template example that uses the component
> library.
>
> The issue with components I was complaining about, albeit not clearly, was
> that if a jsp that is part of a component instance and the jsp throws an
> exception, the code surrounding the include will trap the exception and
> print it to the browser. I would prefer that the exception was not caught so
> that I could set up some global handler. Trapping the exception and printing
> it to the browser means that the site operator won't know users are
> experiencing trouble.
>
> Below is some of the offending code from
> s1.struts.taglib.component.IncludeTag.java. Fixing it would involve trapping
> the exceptions and throwing a JspException. Unfortunately that has its own
> problems because JspExceptions can't nest the root exception so you don't
> know exactly where the error occured. At least you know that something bad
> happened. I am not planning to fix this problem for the time being, I am
> just planning to write the jsps so they don't fail. :)
>
> Hal
>
> ...
>         pageContext.include(page);
>         }
>        catch (IOException ex)
>         {
>         processException( ex, "Can't include page '"+ page+ "' : " +
> ex.getMessage() );
>         }
>        catch (IllegalArgumentException ex)
>         {
>         // Can't resolve page uri
>         processException( ex, "Tag 'include' can't include page '" + page +
> "'. Check if it exist.\n" + ex.getMessage() );
>         }
>        catch (ServletException ex)
>         {
>         Throwable realEx = ex;
>         if( ex.getRootCause() != null )
>           {
>           realEx = ex.getRootCause();
>           }
>         processException( realEx, "[ServletException in:"+ page+ "] " +
> realEx.getMessage()+ "'" );
>         }
>       catch (Exception ex) {
>         processException( ex, "[Exception in:" + page + "] "+
> ex.getMessage());
>         }
>
>

Reply via email to