public void serveResource(ResourceRequest request, ResourceResponse response) throws PortletException, IOException {
String resourceID = request.getResourceID();
if (resourceID != null && resourceID.equals(NODE_RESOURCE_ID)) {
String siteId = request.getParameter("siteId");
Navigation navigation = PortalRequest.getInstance().getPortal().getNavigation(SiteId.fromString(siteId));
String chosenNodeURI = request.getParameter("uri");
Node chosenNode = navigation.getNode(NodePath.fromString(chosenNodeURI), Nodes.visitNodes(getNodeLevel(request)));
boolean showEmptyCategory = getShowEmptyCategory(request);
NodeBean chosenNodeBean = generateNodeBean(chosenNode, SiteId.fromString(siteId), showEmptyCategory);