+ if ("/error".equals(req.getPathInfo()) || "/denied".equals(req.getPathInfo())) {
+ if (DatabaseConnection.hasInstance()) {
+ serviceWithConnection(req, resp);
+ return;
+ }
+ }
+ try (DatabaseConnection.Link l = DatabaseConnection.newLink( !req.getMethod().equals("POST"))) {
+ serviceWithConnection(req, resp);
+ } catch (InterruptedException e) {
+ e.printStackTrace();
+ }
+ }
+
+ protected void serviceWithConnection(final HttpServletRequest req, final HttpServletResponse resp) throws ServletException, IOException {