Originally, it was possible to use the jsp page directive <@ page |errorPage="|relativeURL @> on a nested tile bases| |for error/exception handling. But this doesn't work anymore.


I have no simple solution. You can try one of the following:

   * Put a surrounding try/catch block in the tile throwing an
     exception, and treat the exception from there.
   * Change the <insert ...> tag behavior by changing the
     implementation of InsertTag.java. Look for the method
     processException(...). All is happening here. You can either
     provide your own new tag, or change the original tag  behavior.
   * Avoid throwing an exception in a Tile. This is certainly the best
     way :-). Page rendering should normally not throw an exception. If
     you have an action or controller  throwing an exception, consider
     using a Struts action with associated exception mechanism, or
     catch the exception in the action and do a forward accordingly.
   * Wait for the next release which will provide a better exception
     handling mechanism. This can take some times :-(

Cedric

Thomas Oldervoll wrote:

Cedric Dumoulin <[EMAIL PROTECTED]> writes:



Actually, the <tiles:insert ...> tag catch all the exceptions and
show the message in place of the tile. This behavior help developing a
complex page made of several tiles. If you set the logging level to
"debug", the complete exception stack trace will be shown.



This behavoiur actually causes a problem for me. I want to show a
pretty error message when a page or a tile failes. I use my own
RequestController, a subclass of TilesRequestController. To handle
page faults I have added a method process() that calls super.process()
surrounded by a try/catch-block. I wanted to do the same thing for
each tile, so I tried implementing processInclude(). This didn't work
since <tiles:insert> never calls processInclude(). Investigating other
options, I can't find any way to get <tiles:insert> to not print out
the exception on the JSP and rather let me decide want to do.


What I want is:
- no generated exception message in the HTML output
- the ability to print my own error message and log the error, or
maybe even try to get hold of some cached content to use instead.

Any tips for how to achieve this?

--
Thomas Oldervoll, Zenior AS






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






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



Reply via email to