@Override public PortletResponse getObject() { PortletResponse response = currentRequestAttributes().getResponse(); if (response == null) { throw new IllegalStateException("Current portlet response not available"); } return response; }
@Override public WebRequest getObject() { PortletRequestAttributes requestAttr = currentRequestAttributes(); return new PortletWebRequest(requestAttr.getRequest(), requestAttr.getResponse()); }