@Override protected ModelAndView handleRequestInternal( HttpServletRequest request, HttpServletResponse response) throws Exception { Map<String, Object> map = new HashMap<String, Object>(); String pathInfo = request.getPathInfo(); if (pathInfo == null || !pathInfo.startsWith("/")) { response.sendError(HttpServletResponse.SC_NOT_FOUND); return null; } Share share = shareService.getShareByName(pathInfo.substring(1)); if (share != null && share.getExpires() != null && share.getExpires().before(new Date())) { share = null; } if (share != null) { share.setLastVisited(new Date()); share.setVisitCount(share.getVisitCount() + 1); shareService.updateShare(share); } Player player = playerService.getGuestPlayer(request); map.put("share", share); map.put("entries", getEntries(share, player)); map.put("redirectUrl", settingsService.getUrlRedirectUrl()); map.put("player", player.getId()); ModelAndView result = super.handleRequestInternal(request, response); result.addObject("model", map); return result; }