ProxyController { public static String getPortletId(String requestURI) { Matcher matcher = Pattern.compile("/p/([^/]+)/").matcher(requestURI); matcher.find(); return matcher.group(1); }  @RequestMapping void staticProxy(HttpServletRequest request, HttpServletResponse response); static String getPortletId(String requestURI);  }
@Test public void testGetPortletId() throws Exception { String portletId = ProxyController.getPortletId("/poc-js-portlet/p/pocangularportlet_WAR_pocjsportlet_INSTANCE_MVFuHik6CyK0/styles/vendor-c2769e81fe.css"); Assert.assertEquals("pocangularportlet_WAR_pocjsportlet_INSTANCE_MVFuHik6CyK0", portletId); }