View | Details | Raw Unified | Return to bug 37466
Collapse All | Expand All

(-)src/org/apache/taglibs/standard/tag/common/core/ImportSupport.java (-1 / +21 lines)
Lines 36-41 Link Here
36
import javax.servlet.ServletException;
36
import javax.servlet.ServletException;
37
import javax.servlet.ServletOutputStream;
37
import javax.servlet.ServletOutputStream;
38
import javax.servlet.http.HttpServletRequest;
38
import javax.servlet.http.HttpServletRequest;
39
import javax.servlet.http.HttpServletRequestWrapper;
39
import javax.servlet.http.HttpServletResponse;
40
import javax.servlet.http.HttpServletResponse;
40
import javax.servlet.http.HttpServletResponseWrapper;
41
import javax.servlet.http.HttpServletResponseWrapper;
41
import javax.servlet.jsp.JspException;
42
import javax.servlet.jsp.JspException;
Lines 291-299 Link Here
291
		new ImportResponseWrapper(
292
		new ImportResponseWrapper(
292
		    (HttpServletResponse) pageContext.getResponse());
293
		    (HttpServletResponse) pageContext.getResponse());
293
294
295
            ImportRequestWrapper wrappedRequest = 
296
		new ImportRequestWrapper(
297
		    (HttpServletRequest) pageContext.getRequest());
298
294
	    // spec mandates specific error handling form include()
299
	    // spec mandates specific error handling form include()
295
	    try {
300
	    try {
296
	        rd.include(pageContext.getRequest(), irw);
301
	        rd.include(wrappedRequest, irw);
297
	    } catch (IOException ex) {
302
	    } catch (IOException ex) {
298
		throw new JspException(ex);
303
		throw new JspException(ex);
299
	    } catch (RuntimeException ex) {
304
	    } catch (RuntimeException ex) {
Lines 312-317 Link Here
312
		    stripSession(targetUrl));
317
		    stripSession(targetUrl));
313
	    }
318
	    }
314
319
320
System.err.println("RETURN: " + irw.getString());
321
315
	    // recover the response String from our wrapper
322
	    // recover the response String from our wrapper
316
	    return irw.getString();
323
	    return irw.getString();
317
	}
324
	}
Lines 370-375 Link Here
370
	}
377
	}
371
    }
378
    }
372
379
380
    /** Wraps requests to allow us to enforce the method to be GET */
381
    private class ImportRequestWrapper extends HttpServletRequestWrapper {
382
383
        public ImportRequestWrapper(HttpServletRequest request) {
384
            super(request);
385
        }
386
        
387
        public String getMethod() {
388
            return "GET";
389
        }
390
391
    }
392
373
    /** Wraps responses to allow us to retrieve results as Strings. */
393
    /** Wraps responses to allow us to retrieve results as Strings. */
374
    private class ImportResponseWrapper extends HttpServletResponseWrapper {
394
    private class ImportResponseWrapper extends HttpServletResponseWrapper {
375
395

Return to bug 37466