You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@sling.apache.org by "zhangchunlong (JIRA)" <ji...@apache.org> on 2009/09/23 14:35:16 UTC
[jira] Created: (SLING-1121) ServletResolver not properly resolving
custom error handler 500 servlet/script
ServletResolver not properly resolving custom error handler 500 servlet/script
------------------------------------------------------------------------------
Key: SLING-1121
URL: https://issues.apache.org/jira/browse/SLING-1121
Project: Sling
Issue Type: Bug
Components: Engine
Affects Versions: JCR Resource 2.0.6
Environment: Day CQ5.2.1
Reporter: zhangchunlong
Priority: Minor
Added script named 500.jsp to apps/sling/servlet/errorhandler and servlet resolver is not locating resource.
Have another script at this location (404.jsp) and works fine. In the meantime added a Throwable.jsp script to that location to handle that at exception and is recognized by the ServletResolver.
To reproduce:
1. Create script named 500.jsp in /apps/sling/servlet/errorhandler ( script can be as simple as static html or can include some logic..doesnt really matter )
2. Generate 500 error ( in publish or preview mode )
3. Notice that this script was ignored...
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
[jira] Commented: (SLING-1121) ServletResolver not properly
resolving custom error handler 500 servlet/script
Posted by "Felix Meschberger (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/SLING-1121?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12768363#action_12768363 ]
Felix Meschberger commented on SLING-1121:
------------------------------------------
I think this is a misunderstanding, probably.
The status code error handling scripts are only triggered by the HttpServletResponse.sendError calls. If an uncaught Throwable is caught, it is handled by the respective handler script or the DefaultErrorHandler as a fallback. The latter will HttpServletResponse.setStatus the 500/INTERNAL SERVER ERROR status but not call the sendError method. Hence the 500.jsp will not be called in this case.
Your using a Throwable script is quite correct and intended.
> ServletResolver not properly resolving custom error handler 500 servlet/script
> ------------------------------------------------------------------------------
>
> Key: SLING-1121
> URL: https://issues.apache.org/jira/browse/SLING-1121
> Project: Sling
> Issue Type: Bug
> Components: Servlets
> Affects Versions: Servlets Resolver 2.0.6
> Environment: Day CQ5.2.1
> Reporter: zhangchunlong
> Priority: Minor
>
> Added script named 500.jsp to apps/sling/servlet/errorhandler and servlet resolver is not locating resource.
> Have another script at this location (404.jsp) and works fine. In the meantime added a Throwable.jsp script to that location to handle that at exception and is recognized by the ServletResolver.
> To reproduce:
> 1. Create script named 500.jsp in /apps/sling/servlet/errorhandler ( script can be as simple as static html or can include some logic..doesnt really matter )
> 2. Generate 500 error ( in publish or preview mode )
> 3. Notice that this script was ignored...
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
[jira] Resolved: (SLING-1121) ServletResolver not properly
resolving custom error handler 500 servlet/script
Posted by "Felix Meschberger (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/SLING-1121?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Felix Meschberger resolved SLING-1121.
--------------------------------------
Resolution: Not A Problem
Assignee: Felix Meschberger
This can be resolved, since this works as designed, even though it may seem unexpected.
> ServletResolver not properly resolving custom error handler 500 servlet/script
> ------------------------------------------------------------------------------
>
> Key: SLING-1121
> URL: https://issues.apache.org/jira/browse/SLING-1121
> Project: Sling
> Issue Type: Bug
> Components: Servlets
> Affects Versions: Servlets Resolver 2.0.6
> Environment: Day CQ5.2.1
> Reporter: zhangchunlong
> Assignee: Felix Meschberger
> Priority: Minor
>
> Added script named 500.jsp to apps/sling/servlet/errorhandler and servlet resolver is not locating resource.
> Have another script at this location (404.jsp) and works fine. In the meantime added a Throwable.jsp script to that location to handle that at exception and is recognized by the ServletResolver.
> To reproduce:
> 1. Create script named 500.jsp in /apps/sling/servlet/errorhandler ( script can be as simple as static html or can include some logic..doesnt really matter )
> 2. Generate 500 error ( in publish or preview mode )
> 3. Notice that this script was ignored...
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
[jira] Updated: (SLING-1121) ServletResolver not properly resolving
custom error handler 500 servlet/script
Posted by "zhangchunlong (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/SLING-1121?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
zhangchunlong updated SLING-1121:
---------------------------------
Component/s: (was: Engine)
Servlets
Affects Version/s: (was: JCR Resource 2.0.6)
Servlets Resolver 2.0.6
Update component and affect versions.
> ServletResolver not properly resolving custom error handler 500 servlet/script
> ------------------------------------------------------------------------------
>
> Key: SLING-1121
> URL: https://issues.apache.org/jira/browse/SLING-1121
> Project: Sling
> Issue Type: Bug
> Components: Servlets
> Affects Versions: Servlets Resolver 2.0.6
> Environment: Day CQ5.2.1
> Reporter: zhangchunlong
> Priority: Minor
>
> Added script named 500.jsp to apps/sling/servlet/errorhandler and servlet resolver is not locating resource.
> Have another script at this location (404.jsp) and works fine. In the meantime added a Throwable.jsp script to that location to handle that at exception and is recognized by the ServletResolver.
> To reproduce:
> 1. Create script named 500.jsp in /apps/sling/servlet/errorhandler ( script can be as simple as static html or can include some logic..doesnt really matter )
> 2. Generate 500 error ( in publish or preview mode )
> 3. Notice that this script was ignored...
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
[jira] Closed: (SLING-1121) ServletResolver not properly resolving
custom error handler 500 servlet/script
Posted by "Felix Meschberger (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/SLING-1121?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Felix Meschberger closed SLING-1121.
------------------------------------
This can probably be closed.
> ServletResolver not properly resolving custom error handler 500 servlet/script
> ------------------------------------------------------------------------------
>
> Key: SLING-1121
> URL: https://issues.apache.org/jira/browse/SLING-1121
> Project: Sling
> Issue Type: Bug
> Components: Servlets
> Affects Versions: Servlets Resolver 2.0.6
> Environment: Day CQ5.2.1
> Reporter: zhangchunlong
> Assignee: Felix Meschberger
> Priority: Minor
>
> Added script named 500.jsp to apps/sling/servlet/errorhandler and servlet resolver is not locating resource.
> Have another script at this location (404.jsp) and works fine. In the meantime added a Throwable.jsp script to that location to handle that at exception and is recognized by the ServletResolver.
> To reproduce:
> 1. Create script named 500.jsp in /apps/sling/servlet/errorhandler ( script can be as simple as static html or can include some logic..doesnt really matter )
> 2. Generate 500 error ( in publish or preview mode )
> 3. Notice that this script was ignored...
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.