Identifier id = APILocator.getIdentifierAPI().find(host, uri);
HTMLPage myHTMLPage = (HTMLPage) APILocator.getVersionableAPI().findLiveVersion(id, APILocator.getUserAPI().getSystemUser(),false);
req.setAttribute("htmlPage", myHTMLPage);
if (!InodeUtils.isSet(id.getInode())) {
VirtualLink vl = null;
try{
vl = VirtualLinkFactory.getVirtualLinkByURL(uri);
}
catch(DotHibernateException dhe){
Logger.debug(VirtualLinksCache.class, "failed to find: " + uri);
}
if (vl != null && !InodeUtils.isSet(vl.getInode())) {
myHTMLPage.setTitle(LanguageUtil.get(user, "message.htmlpageviews.pagenotfound"));
SessionMessages.add(req, "message", "message.htmlpageviews.pagenotfound");
} else {
req.setAttribute(WebKeys.VIRTUAL_LINK_EDIT, vl);