1 17 18 package javax.servlet.jsp; 19 20 import java.io.IOException ; 21 22 import javax.servlet.Servlet ; 23 import javax.servlet.ServletConfig ; 24 import javax.servlet.ServletContext ; 25 import javax.servlet.ServletException ; 26 import javax.servlet.ServletRequest ; 27 import javax.servlet.ServletResponse ; 28 29 import javax.servlet.http.HttpSession ; 30 31 import javax.servlet.jsp.tagext.BodyContent ; 32 33 93 94 abstract public class PageContext 95 extends JspContext 96 { 97 98 102 public PageContext() { 103 } 104 105 110 111 public static final int PAGE_SCOPE = 1; 112 113 118 119 public static final int REQUEST_SCOPE = 2; 120 121 126 127 public static final int SESSION_SCOPE = 3; 128 129 133 134 public static final int APPLICATION_SCOPE = 4; 135 136 139 140 public static final String PAGE = "javax.servlet.jsp.jspPage"; 141 142 145 146 public static final String PAGECONTEXT = "javax.servlet.jsp.jspPageContext"; 147 148 151 152 public static final String REQUEST = "javax.servlet.jsp.jspRequest"; 153 154 157 158 public static final String RESPONSE = "javax.servlet.jsp.jspResponse"; 159 160 163 164 public static final String CONFIG = "javax.servlet.jsp.jspConfig"; 165 166 169 170 public static final String SESSION = "javax.servlet.jsp.jspSession"; 171 174 175 public static final String OUT = "javax.servlet.jsp.jspOut"; 176 177 180 181 public static final String APPLICATION = "javax.servlet.jsp.jspApplication"; 182 183 187 188 public static final String EXCEPTION = "javax.servlet.jsp.jspException"; 189 190 224 225 abstract public void initialize(Servlet servlet, ServletRequest request, 226 ServletResponse response, String errorPageURL, boolean needsSession, 227 int bufferSize, boolean autoFlush) 228 throws IOException , IllegalStateException , IllegalArgumentException ; 229 230 244 245 abstract public void release(); 246 247 252 253 abstract public HttpSession getSession(); 254 255 262 263 abstract public Object getPage(); 264 265 266 271 272 abstract public ServletRequest getRequest(); 273 274 279 280 abstract public ServletResponse getResponse(); 281 282 287 288 abstract public Exception getException(); 289 290 295 296 abstract public ServletConfig getServletConfig(); 297 298 303 304 abstract public ServletContext getServletContext(); 305 306 340 341 abstract public void forward(String relativeUrlPath) 342 throws ServletException , IOException ; 343 344 374 abstract public void include(String relativeUrlPath) 375 throws ServletException , IOException ; 376 377 411 abstract public void include(String relativeUrlPath, boolean flush) 412 throws ServletException , IOException ; 413 414 447 448 abstract public void handlePageException(Exception e) 449 throws ServletException , IOException ; 450 451 486 487 abstract public void handlePageException(Throwable t) 488 throws ServletException , IOException ; 489 490 497 498 public BodyContent pushBody() { 499 return null; } 501 502 503 514 public ErrorData getErrorData() { 515 return new ErrorData ( 516 (Throwable )getRequest().getAttribute( "javax.servlet.error.exception" ), 517 ((Integer )getRequest().getAttribute( 518 "javax.servlet.error.status_code" )).intValue(), 519 (String )getRequest().getAttribute( "javax.servlet.error.request_uri" ), 520 (String )getRequest().getAttribute( "javax.servlet.error.servlet_name" ) ); 521 } 522 523 } 524 | Popular Tags |