MCPcopy Create free account
hub / github.com/apache/tomcat / PageContextImpl

Class PageContextImpl

java/org/apache/jasper/runtime/PageContextImpl.java:57–675  ·  view source on GitHub ↗

Implementation of the PageContext class from the JSP spec. Also doubles as a VariableResolver for the EL.

Source from the content-addressed store, hash-verified

55 * Implementation of the PageContext class from the JSP spec. Also doubles as a VariableResolver for the EL.
56 */
57public class PageContextImpl extends PageContext {
58
59 private static final JspFactory jspf = JspFactory.getDefaultFactory();
60
61 private static final BodyContentImpl[] EMPTY_BODY_CONTENT_IMPL_ARRAY = new BodyContentImpl[0];
62
63 private BodyContentImpl[] outs;
64
65 private int depth;
66
67 // per-servlet state
68 private Servlet servlet;
69
70 private ServletConfig config;
71
72 private ServletContext context;
73
74 private JspApplicationContextImpl applicationContext;
75
76 private String errorPageURL;
77
78 private boolean limitBodyContentBuffer;
79
80 private int bodyContentTagBufferSize = Constants.DEFAULT_TAG_BUFFER_SIZE;
81
82 // page-scope attributes
83 private final transient HashMap<String,Object> attributes;
84
85 // per-request state
86 private transient ServletRequest request;
87
88 private transient ServletResponse response;
89
90 private transient HttpSession session;
91
92 private transient ELContextImpl elContext;
93
94
95 // initial output stream
96 private transient JspWriter out;
97
98 private transient JspWriterImpl baseOut;
99
100 PageContextImpl() {
101 this.outs = EMPTY_BODY_CONTENT_IMPL_ARRAY;
102 this.attributes = new HashMap<>(16);
103 this.depth = -1;
104 }
105
106 @Override
107 public void initialize(Servlet servlet, ServletRequest request, ServletResponse response, String errorPageURL,
108 boolean needsSession, int bufferSize, boolean autoFlush) throws IOException {
109
110 // initialize state
111 this.servlet = servlet;
112 this.config = servlet.getServletConfig();
113 this.context = config.getServletContext();
114 this.errorPageURL = errorPageURL;

Callers

nothing calls this directly

Calls 1

getDefaultFactoryMethod · 0.95

Tested by

no test coverage detected