throw new JspException(L.l("URL `{0}' must start with `/' with context `{0}'", url, context));
if (context != null && context.startsWith("/")) {
ServletContext app = pageContext.getServletContext().getContext(context);
RequestDispatcher disp = app.getRequestDispatcher(url);
if (disp == null)
throw new JspException(L.l("URL `{0}' does not map to any servlet",
url));
CauchoResponse response = (CauchoResponse) pageContext.getResponse();
String charEncoding = getCharEncoding();
if (charEncoding != null)
response.getResponseStream().setEncoding(charEncoding);
final ServletRequest request = pageContext.getRequest();
disp.include(request, response);
final Integer statusCode
= (Integer) request.getAttribute("com.caucho.dispatch.response.statusCode");
//jsp/1jif
if (statusCode != null) {
final int status = statusCode.intValue();
if (status < 200 || status > 299) {
String message = L.l(
"c:import status code {0} received while serving {1}",
statusCode,
context + url);
throw new JspException(message);
}
}
/*
int status = response.getStatus();
if (status < 200 || status > 299) {
String message = L.l(
"c:import status code {0} received while serving {1}",
status,
context + url);
throw new JspException(message);
}
*/
}
else
handleExternalBody(context + url);
return;
}
int colon = url.indexOf(':');
int slash = url.indexOf('/');
if (slash == 0 || colon < 0 || slash < 0 || slash < colon) {
ServletRequest request = pageContext.getRequest();
CauchoResponse response = (CauchoResponse) pageContext.getResponse();
String charEncoding = getCharEncoding();
if (charEncoding != null)
response.getResponseStream().setEncoding(charEncoding);
RequestDispatcher disp = request.getRequestDispatcher(url);
JstlImportResponseWrapper wrapper = new JstlImportResponseWrapper(response);
disp.include(request, wrapper);
//jsp/1jie
int status = wrapper.getStatus();
if (status < 200 || status > 299) {