diff --git a/webapp/src/edu/cornell/mannlib/vitro/webapp/controller/EntityController.java b/webapp/src/edu/cornell/mannlib/vitro/webapp/controller/EntityController.java index ae7a1082e..d079b0fb4 100644 --- a/webapp/src/edu/cornell/mannlib/vitro/webapp/controller/EntityController.java +++ b/webapp/src/edu/cornell/mannlib/vitro/webapp/controller/EntityController.java @@ -148,6 +148,7 @@ public class EntityController extends VitroHttpServlet { // insert test for whether a css files of the same name exists, and populate the customCss string for use when construction the header } String netid = iwDao.getNetId(entity.getURI()); + vreq.setAttribute("netid", netid); vreq.setAttribute("vclassName", vclassName); vreq.setAttribute("entity",entity); @@ -202,7 +203,7 @@ public class EntityController extends VitroHttpServlet { vreq.setAttribute("scripts", "/templates/entity/entity_inject_head.jsp"); RequestDispatcher rd = vreq.getRequestDispatcher( view ); - rd.forward(req,res); + rd.forward(vreq,res); } catch (Throwable e) { log.error(e); req.setAttribute("javax.servlet.jsp.jspException",e); diff --git a/webapp/src/edu/cornell/mannlib/vitro/webapp/web/EntityWebUtils.java b/webapp/src/edu/cornell/mannlib/vitro/webapp/web/EntityWebUtils.java index 15bc94a12..21a6d1302 100755 --- a/webapp/src/edu/cornell/mannlib/vitro/webapp/web/EntityWebUtils.java +++ b/webapp/src/edu/cornell/mannlib/vitro/webapp/web/EntityWebUtils.java @@ -67,13 +67,16 @@ public class EntityWebUtils { // see if we can get the URI from a namespace prefix and a local name String requestURI = vreq.getRequestURI(); + String[] requestParts = requestURI.split("/individual/"); String[] URIParts = requestParts[1].split("/"); + String namespace = ""; NamespaceMapper namespaceMapper = NamespaceMapperFactory.getNamespaceMapper(vreq.getSession().getServletContext()); String t; namespace = ( (t = namespaceMapper.getNamespaceForPrefix(URIParts[0])) != null) ? t : ""; String localName = URIParts[1]; + return vreq.getWebappDaoFactory().getIndividualDao().getIndividualByURI(namespace+localName); // entityIdStr = vreq.getParameter("adw");