public void doBeforeServeResource(HstRequest request, HstResponse response) throws HstComponentException { if (componentConfig.getServeResourcePath() == null && request.getResourceID() != null) { response.setServeResourcePath(request.getResourceID()); } }
@Override public void doBeforeServeResource(HstRequest request, HstResponse response) throws HstComponentException { super.doBeforeServeResource(request, response); request.setAttribute(LIFECYCLE_PHASE_ATTRIBUTE, BEFORE_RESOURCE_PHASE); String dispatchPath = getDispatchPathParameter(request, request.getLifecyclePhase()); if (dispatchPath != null) { response.setServeResourcePath(dispatchPath); } try { doDispatch(getDispatchPathParameter(request, BEFORE_RESOURCE_PHASE), request, response); } finally { request.removeAttribute(LIFECYCLE_PHASE_ATTRIBUTE); } }
@Override public void doBeforeServeResource(HstRequest request, HstResponse response) throws HstComponentException { super.doBeforeServeResource(request, response); request.setAttribute(LIFECYCLE_PHASE_ATTRIBUTE, BEFORE_RESOURCE_PHASE); String dispatchPath = getDispatchPathParameter(request, request.getLifecyclePhase()); if (dispatchPath != null) { response.setServeResourcePath(dispatchPath); } try { doDispatch(getDispatchPathParameter(request, BEFORE_RESOURCE_PHASE), request, response); } finally { request.removeAttribute(LIFECYCLE_PHASE_ATTRIBUTE); } }