Enhancement requests should be posted to the bug database, as described
here:

http://jakarta.apache.org/struts/using.html#Bugs

That will make sure it doesn't get lost, and will be addressed at some
point.

--
Martin Cooper


On 13 Jan 2003, Jay wrote:

> Requested modification of tiles/InsertTag.java
>
> I appreciate your ExceptionHandler concept and use it for capturing
> critical errors, thoroughly logging both error and context information
> and forwarding to a special web page that displays very concise
> information about the error (error reference number, etc)  However, for
> completeness sake, I wish to capture any serious errors that occur in
> the "forwarding" phase beyond action handling processing, where,
> particularly using "tiles", one or more JSP servlets are run.
>
> I found a solution that seemed straightforward.  Since I already
> sub-classed TilesRequestProcessor to override one of the other "process"
> methods, I simply overrode processActionForward, wrapped the call to the
> super class in a try/catch block, and forwarded accordingly if an
> exception is thrown.  Below shows the pertinent portions of the
> override:
>
>
> protected void processActionForward(HttpServletRequest request,
>                                         HttpServletResponse response,
>                                         ActionForward forward)
>         throws IOException, ServletException {
>
>         try {
>                 super.processActionForward(request,response,forward);
>         }
>         catch (Throwable ex) {
>                 // Log information, etc
>                 ActionForward errorForward;
>                 // Fetch special forwarding for critical errors.
>                 .
>                 .
>                 .       .
>
>               super.processActionForward(request,response,errorForward);             
> }
> }
>
>
> The "snag" I ran into was tiles/InsertTag.  The normal behavior of the
> class is to broadcast the error message on the web page and "carry on."
> Specifically, from the inner protected class
> InsertHandler::processException():
>
>         protected void processException(Throwable ex, String msg) throws
>                         JspException {
>                 .
>                 .
>                 .
>                 .
>                 } else { // show only message
>
> pageContext.getOut().println(msg);
>                 } // end if
>
>
> Could you kindly consider moving the real processing of
> processException() to a method inside InsertTag itself so that users may
> easily sub-class to override the "broadcasting" behavior?  In other
> words, could you do something like:
>
>         protected class InsertHandler {
>                 .
>                 .
>                 protected void processException(Throwable ex.msg,String
> msg)  throws
> JspException
>                 {
>                         processTilesException(ex,msg);
>                 }
>
>         }
>
>
>         /** Real work done here
>          */
>         protected void processTilesException(Throwable ex, String msg)
> throws
>                         JspException {
>                 .
>                 .
>                 .
>         }
>
> I would be greatly appreciative if you consider this very minor change.
>
> Thank you,
> Jay
>
>
>
>
> --
> To unsubscribe, e-mail:   <mailto:[EMAIL PROTECTED]>
> For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>
>
>


--
To unsubscribe, e-mail:   <mailto:[EMAIL PROTECTED]>
For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>

Reply via email to