Search in sources :

Example 1 with IMetaDataBufferingWebResponse

use of org.apache.wicket.protocol.http.IMetaDataBufferingWebResponse in project wicket by apache.

the class NonResettingRestartException method transferResponseMetaData.

private void transferResponseMetaData() {
    RequestCycle cycle = RequestCycle.get();
    Response response = cycle.getResponse();
    if (response instanceof IMetaDataBufferingWebResponse) {
        WebResponse originalResponse = (WebResponse) cycle.getOriginalResponse();
        if (originalResponse != response) {
            IMetaDataBufferingWebResponse bufferingWebResponse = (IMetaDataBufferingWebResponse) response;
            bufferingWebResponse.writeMetaData(originalResponse);
        }
    }
}
Also used : HttpServletResponse(javax.servlet.http.HttpServletResponse) WebResponse(org.apache.wicket.request.http.WebResponse) IMetaDataBufferingWebResponse(org.apache.wicket.protocol.http.IMetaDataBufferingWebResponse) Response(org.apache.wicket.request.Response) IMetaDataBufferingWebResponse(org.apache.wicket.protocol.http.IMetaDataBufferingWebResponse) WebResponse(org.apache.wicket.request.http.WebResponse) IMetaDataBufferingWebResponse(org.apache.wicket.protocol.http.IMetaDataBufferingWebResponse) RequestCycle(org.apache.wicket.request.cycle.RequestCycle)

Aggregations

HttpServletResponse (javax.servlet.http.HttpServletResponse)1 IMetaDataBufferingWebResponse (org.apache.wicket.protocol.http.IMetaDataBufferingWebResponse)1 Response (org.apache.wicket.request.Response)1 RequestCycle (org.apache.wicket.request.cycle.RequestCycle)1 WebResponse (org.apache.wicket.request.http.WebResponse)1