220 } |
220 } |
221 |
221 |
222 private void forwardToFullView(HttpServletRequest req, HttpServletResponse resp) |
222 private void forwardToFullView(HttpServletRequest req, HttpServletResponse resp) |
223 throws IOException, ServletException { |
223 throws IOException, ServletException { |
224 |
224 |
225 req.setAttribute(Constants.REQ_ATTR_MENU, getModuleManager().getMainMenu()); |
225 req.setAttribute(Constants.REQ_ATTR_MENU, getModuleManager().getMainMenu(getDatabaseFacade())); |
226 req.getRequestDispatcher(HTML_FULL_DISPATCHER).forward(req, resp); |
226 req.getRequestDispatcher(HTML_FULL_DISPATCHER).forward(req, resp); |
227 } |
227 } |
228 |
228 |
229 private Optional<HandlerMethod> findMapping(HttpMethod method, HttpServletRequest req) { |
229 private Optional<HandlerMethod> findMapping(HttpMethod method, HttpServletRequest req) { |
230 return Optional.ofNullable(mappings.get(method)).map( |
230 return Optional.ofNullable(mappings.get(method)).map( |
247 } |
247 } |
248 } |
248 } |
249 |
249 |
250 private void doProcess(HttpMethod method, HttpServletRequest req, HttpServletResponse resp) |
250 private void doProcess(HttpMethod method, HttpServletRequest req, HttpServletResponse resp) |
251 throws ServletException, IOException { |
251 throws ServletException, IOException { |
252 |
252 |
253 // Synchronize module information with database |
253 // Synchronize module information with database |
254 getModuleManager().syncWithDatabase(getDatabaseFacade()); |
254 getModuleManager().syncWithDatabase(getDatabaseFacade()); |
255 |
255 |
256 // choose the requested language as session language (if available) or fall back to english, otherwise |
256 // choose the requested language as session language (if available) or fall back to english, otherwise |
257 HttpSession session = req.getSession(); |
257 HttpSession session = req.getSession(); |