Commit 54098cdb authored by Matt Tucker's avatar Matt Tucker Committed by matt

More error handling.


git-svn-id: http://svn.igniterealtime.org/svn/repos/messenger/trunk@524 b35dd754-fafc-0310-a699-88a17e54d16e
parent 038b3a22
......@@ -69,19 +69,26 @@ public class PluginServlet extends HttpServlet {
return;
}
else {
// Handle JSP requests.
if (pathInfo.endsWith(".jsp")) {
handleJSP(pathInfo, request, response);
return;
}
// Handle image requests.
else if (pathInfo.endsWith(".gif") || pathInfo.endsWith(".png")) {
handleImage(pathInfo, response);
return;
try {
// Handle JSP requests.
if (pathInfo.endsWith(".jsp")) {
handleJSP(pathInfo, request, response);
return;
}
// Handle image requests.
else if (pathInfo.endsWith(".gif") || pathInfo.endsWith(".png")) {
handleImage(pathInfo, response);
return;
}
// Anything else results in a 404.
else {
response.setStatus(HttpServletResponse.SC_NOT_FOUND);
return;
}
}
// Anything else results in a 404.
else {
response.setStatus(HttpServletResponse.SC_NOT_FOUND);
catch (Exception e) {
Log.error(e);
response.setStatus(HttpServletResponse.SC_INTERNAL_SERVER_ERROR);
return;
}
}
......@@ -135,7 +142,7 @@ public class PluginServlet extends HttpServlet {
}
}
catch (Throwable e) {
e.printStackTrace();
Log.error(e);
}
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment