[MAGNOLIA-1565] Allow error pages (401,404,500 etc,etc) to be configured as Magnolia pages Created: 31/May/07 Updated: 23/Jan/13 Resolved: 19/Aug/09 |
|
| Status: | Closed |
| Project: | Magnolia |
| Component/s: | None |
| Affects Version/s: | None |
| Fix Version/s: | 3.5 |
| Type: | New Feature | Priority: | Minor |
| Reporter: | zam6ak | Assignee: | Fabrizio Giustina |
| Resolution: | Fixed | Votes: | 0 |
| Labels: | None | ||
| Remaining Estimate: | Not Specified | ||
| Time Spent: | Not Specified | ||
| Original Estimate: | Not Specified | ||
| Environment: |
3.1-SNAPSHOT |
||
| Issue Links: |
|
||||||||||||
| Template: |
|
||||||||||||
| Acceptance criteria: |
Empty
|
||||||||||||
| Date of First Response: | |||||||||||||
| Description |
|
While discussing error page locations with Sameer (via dev list and support), it was suggested that this feature may make it into next version. The goal would be to mimic web.xml error page logic where one can define an error code or exception (or both) and specify Magnolia page that should be displayed when such error/exception occurs. |
| Comments |
| Comment by Magnolia International [ 10/Sep/08 ] |
|
Since 3.5, the ERROR dispatcher is assigned to the main Magnolia filter by default. If that's the case in your setup too, the 404 page in your web.xml needs to be reachable through Magnolia. Typically, you could have this in your web.xml:
<error-page>
<error-code>404</error-code>
<location>/errors/404.html</location>
</error-page>
.. and upon request of an unexisting resource, Magnolia would serve your /error/404 page. Now, as far as I can tell, there is no other way than mapping all error codes in web.xml - we could do so by default, and a have location like /.magnolia/error which would take care, based on some configuration, render the configured page for the different codes, but
Any suggestion ? |
| Comment by Magnolia International [ 10/Sep/08 ] |
|
This just in, the following request attributes are set when serving an error page:
|
| Comment by Fabrizio Giustina [ 19/Aug/09 ] |
|
Solved a long time ago, by mapping the magnolia filter with ERROR dispatcher like explained by Gregory |