Skip to content
Snippets Groups Projects
Commit d42d9b19 authored by srosse's avatar srosse
Browse files

no-jira: set the content type of error.html pages

parent dea527ba
No related branches found
No related tags found
No related merge requests found
...@@ -44,6 +44,7 @@ public class ErrorsDispatcher implements Dispatcher { ...@@ -44,6 +44,7 @@ public class ErrorsDispatcher implements Dispatcher {
@Override @Override
public void execute(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException { public void execute(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {
try(PrintWriter writer = response.getWriter()) { try(PrintWriter writer = response.getWriter()) {
response.setContentType("text/html;charset=utf-8");
writer.append("<!DOCTYPE html><html>") writer.append("<!DOCTYPE html><html>")
.append("<head><title>Unexpected error</title></head>") .append("<head><title>Unexpected error</title></head>")
.append("<body><h3>An unexpected error occured... Sorry!</h3><p>Error code: ") .append("<body><h3>An unexpected error occured... Sorry!</h3><p>Error code: ")
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment