Details
-
Bug
-
Status: Closed
-
Major
-
Resolution: Fixed
-
None
-
None
-
None
-
Windows XP, WebSphere 6.1.7
-
Important
Description
When XSL file attached to the action of result type="xslt" has even simple error (e.g. missing single quote), then the exception it generates can not caught by any means. JSP defined to handle the result type="error" for this action is ignored and exception is promoted to front-end as HTTP 404 (page not found) error.
The situation is not limited by only syntax errors in XSL. The problem is even more generic. Eventually any error during XSLT would break the action and this exception may not be caught.
The problem is that XSLT is performed out of Action class and Struts does not offer any way to register an exception handling for this operation. It might be possible to instantiate the XSLTResult class but it is not clear (not documented) if there is a way to set it as default transformation class.
Struts should give users means of control over XSLTResult. The best way would be if action classes could implement some XSLT interface with the control over exception handling, URL resolving etc.