⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 page_context.xtp

📁 解压在c盘
💻 XTP
字号:
<title css='default.css'>PageContext</title><objsummary/><section title='PageContext'><defun title='attribute'><sum>This object contains page scope variables.</sum>  In particular,beans declared with the jsp:useBean page scope are stored in thepageContext attribute.<example><example>&lt;%   pageContext.attribute.a = 1;  pageContext.attribute.b = 2;  for (var name in pageContext.attribute)    out.writeln(name, ": ", pageContext.attribute[name]); %&gt;</example><results>a: 1b: 2</results></example></defun><defun title='out'><sum>Returns the JspWriter for this response.</sum>  This is the sameas the JSP 'out' implicit variable.  JspWriter has the same properties andmethods as output <a href='stream.html'>streams</a>.<example><example>&lt;%   pageContext.out.writeln("Hello, world");%&gt;</example><results>Hello, world</results></example></defun><defun title='session'><sum>Returns the page's <a href='session.html'>session</a>.</sum><example><example>Welcome back.  You've visited&lt;%= pageContext.session.value++ %&gt; times</example></example></defun><defun title='servletContext'><sum>Returns the page's <a href='application.html'>application</a>object.</sum>  Along with application variables, the applicationobject lets scripts dynamically include files and forward results.<example><example>You are visistor&lt;%= pageContext.servletContext.attribute++ %&gt;</example></example></defun><defun title='servlet'><sum>Returns the page's generated servlet.</sum>  <note>This is notthe JSP engine's servlet, but the servlet generated for the particularJSP page.</note><example><example>&lt;%@ page info='Special Servlet' %&gt;&lt;%= pageContext.servlet.servletInfo %gt;</example><results>Special Servlet</results></example></defun><defun title='servletRequest'><sum>Returns the page's <a href='request.html'>request</a>object.</sum>  The request object contains information from the HTTPrequest, such as form data and allows forwarding pages to pass alongattributes.<example><example>&lt;%  var req = pageContext.servletRequest  for (var key in req.form)    out.writeln(key, ": ", req.form[key]);%&gt;</example><results>name: George Washingtonhonesty: mythical</results></example></defun><defun title='servletResponse'><sum>Returns the page's <a href='response.html'>response</a>object.</sum>  The response object lets application set responseheaders and status codes.  In general, JSP applications will write tothe 'out' object instead of using the response object directly.<example>&lt;%  var res = pageContext.servletResponse  res.header["Expires"] = new Date().toString()%&gt;</example></defun><defun title='exception'><sum>For <a href='jsp-directives.html#errorpage'>error pages</a>,returns the thrown exception.</sum><example>&lt;%  response.setStatus(500);  out.writeln("Exception: ", pageContext.exception)%&gt;</example></defun><defun name='include' title='include(href)'><sum>Includes the dynamic contents of the page at <var/href/>.</sum><var/href/> is relative to the current page and its root is theapplication root.<p/><code/include/> is the proper way to include JSP generated contents inthe current page.</defun><defun name='forward' title='forward(href)'><sum>Includes the dynamic contents of the page at <var/href/>.</sum><var/href/> is relative to the current page and its root is theapplication root.<p/><code/forward/> cannot be called after data has returned to thebrowser.  Because of JSP's 8k <ahref='jsp-directives.html#buffer'>buffer</a>,  most applications canignore this limitation.</defun></section>

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -