}
@RequestMapping(value = "/tag/{path}.jspx", method = RequestMethod.GET)
public String tags(@PathVariable String path, HttpServletRequest request,
HttpServletResponse response, ModelMap model) {
CmsSite site = CmsUtils.getSite(request);
if (StringUtils.isBlank(path)) {
return FrontUtils.pageNotFound(request, response, model);
}
int index = path.indexOf("_");
int pageNo, id;
try {
if (index != -1) {
id = Integer.valueOf(path.substring(0, index));
pageNo = Integer.valueOf(path.substring(index + 1, path
.length()));
} else {
id = Integer.valueOf(path);
pageNo = 1;
}
} catch (NumberFormatException e) {
return FrontUtils.pageNotFound(request, response, model);
}
ContentTag tag = contentTagMng.findById(id);
if (tag == null) {
return FrontUtils.pageNotFound(request, response, model);
}
model.addAttribute("tag", tag);
model.addAttribute(FrontUtils.PAGE_NO, pageNo);
FrontUtils.frontData(request, model, site);
FrontUtils.frontPageData(request, model);
return FrontUtils.getTplPath(request, site.getSolutionPath(),
TPLDIR_SPECIAL, TAGS_DETAIL);
}