for (Language l: config.getLanguages()) {
if (path.equals(l.toURL())) {
- doTemporaryRedirect(config.getDefaultCategory().getURL(), resp);
+ doTemporaryRedirect(config.getDefaultCategory(l).getURL(), resp);
return ;
}
}
resp.getWriter().write("Not found " + req.getPathInfo());
resp.setStatus(HttpServletResponse.SC_NOT_FOUND);
- } catch (IOException e) {
+ } catch (IOException | RuntimeException e) {
LOG.log(Level.SEVERE, "doGet failure", e);
resp.setStatus(HttpServletResponse.SC_INTERNAL_SERVER_ERROR);
}