Have you tried adding the error-page element to your web.xml ?

Something like:

<error-page>
       <error-code>505</error-code>
       <location>/myErrorHandlerPage.html</location>
   </error-page>

Angelo Chen wrote:
Hi Filip,

That make sense. now how to deal these kinds of exceptions?

Filip S. Adamsen-2 wrote:
Hi Angelo,

I think the upload processing happens before the request gets to where exceptions are caught på RequestExceptionHandler, if that makes sense.

Perhaps that's why?

-Filip

On 2008-08-27 16:37, Angelo Chen wrote:
hi,

Thanks for the reply. I copied the code from the cookbook,  i deleted the
other part, i just want to be sure if the method will be called when an
exception occurs, it does with all those normal exceptions, but the 505
status dumped coming somewhere from Apache's file upload routine was not
caught. any idea>


HugoPalma wrote:
That's not how decoration works.
You have to return your RequestExceptionHandler implementation that will decorate the default one. Take a look at the example at the bottom of the page here
http://tapestry.apache.org/tapestry5/cookbook/exceptions.html

Angelo Chen wrote:
Hi,

I would like to catch the exception of FileSizeLimitExceededException,
I
tried the decorator method like this:

public RequestExceptionHandler decorateRequestExceptionHandler(
          final Logger logger,
          final ResponseRenderer renderer,
          final ComponentSource componentSource,
          @Symbol(SymbolConstants.PRODUCTION_MODE)
          boolean productionMode,
          Object service)
  {
      System.out.println("exception!");
      return null;
}

but this method will not be called if the exception is
FileSizeLimitExceededException, the error simply dumps to the browser
screen, any idea why those errors can not be caught?

// limit the size of uploading file

public static void contributeApplicationDefaults( MappedConfiguration<String, String> configuration) { configuration.add(UploadSymbols.REQUESTSIZE_MAX, "1000000"); configuration.add(UploadSymbols.FILESIZE_MAX, "500000"); }

---------------------------------------------------------------------
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