PDF Generating Tool Support Forum

HOME   Login   Register    Search




  Subject: Avoid error-page handling
   PostPosted: 01 Aug 2011, 10:42 
We have a setup where we call a servlet to generate a PDF. The servlet then calls pd4ml.render with an URL to a jsp.

When an error occurs in the jsp, the module's web.xml error-page configuration kicks in resulting in a PDF containing the error page.

We would like to be able to send specific HTTP-status code back to the original caller of the servlet instead.

The only way we can seem to make that happen is if we drop the error-page config, but we use that to display an error page for the rest of the web module.

Do you have any ideas as to set this up without having to move all Pd4ml into seperate module?

/Clfr


  Subject: Re: Avoid error-page handling
   PostPosted: 03 Aug 2011, 18:58 
I've just done some testing. By 404 error PD4ML throws to the top level FileNotFoundException, for others it is something like "Server returned HTTP response code: 500 for URL ...".

So obviously by error your JSP container returns the pre-configured error page with HTTP response code 200. In the case there is no indications to distinguish if it is an error page or a correct server response.



[Reply]     [ 2 posts ] 

Copyright ©2004-10 zefer|org. All rights reserved. Bookmark and Share