Fix error-page for POST,PUT, etc.#1498
Fix error-page for POST,PUT, etc.#1498thomasmey wants to merge 4 commits intomitreid-connect:masterfrom thomasmey:bugfix/error-page
Conversation
the view controller error in authz-config.xml forwards to the resp. JSP, but the error page only supports GET method. Install a real error controller that at least logs all error messages and then forwards to the view controller, so not handled exceptions for e.g. POST request can actually be found.
Codecov Report
@@ Coverage Diff @@
## master #1498 +/- ##
=========================================
Coverage 25.21% 25.21%
Complexity 912 912
=========================================
Files 209 209
Lines 11689 11689
Branches 2116 2116
=========================================
Hits 2947 2947
Misses 8227 8227
Partials 515 515Continue to review full report at Codecov.
|
|
|
||
| <error-page> | ||
| <location>/error</location> | ||
| <location>/errorController</location> |
There was a problem hiding this comment.
Can we still map this to /error?
There was a problem hiding this comment.
So I'm not sure this is possbile without breaking things. Some other jsp pages directly redirect/forwards to /error when changing the above "catch all" error location these wont get catch. Or do I misunderstand. Let me ask the otherway around:
- under what path should the ErrorController be reachable?
- under what path should the error.jsp be reachable?
another thing that should be done is to move the controller logic from error.jsp in the ErrorController.
| <artifactId>servlet-api</artifactId> | ||
| <version>2.5</version> | ||
| <artifactId>javax.servlet-api</artifactId> | ||
| <version>3.0.1</version> |
There was a problem hiding this comment.
Are there any other changes that updating the servlet version would bring to the underlying project?
There was a problem hiding this comment.
this gives the static defines like RequestDispatcher.ERROR_MESSAGE as web.xml uses 3.0 syntax already.
|
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## master #1498 +/- ##
=========================================
Coverage 25.21% 25.21%
Complexity 912 912
=========================================
Files 209 209
Lines 11689 11689
Branches 2116 2116
=========================================
Hits 2947 2947
Misses 8227 8227
Partials 515 515 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
the view controller error in authz-config.xml forwards to the resp. JSP,
but the error page only supports GET method.
Install a real error controller that at least logs all error messages
and then forwards to the view controller, so not handled exceptions for
e.g. POST request can actually be found.