pageContext對(duì)象的方法

Me_YJ
2014-09-20
1 回答
舉報(bào)
0/150
提交
取消
2014-09-20
舉報(bào)
2017-03-11
JspWriter getOut() 返回當(dāng)前客戶(hù)端響應(yīng)被使用的JspWriter流(out)
HttpSession getSession() 返回當(dāng)前頁(yè)中的HttpSession對(duì)象(session)
Object getPage() 返回當(dāng)前頁(yè)的Object對(duì)象(page)
ServletRequest getRequest() 返回當(dāng)前頁(yè)的ServletRequest對(duì)象(request)
ServletResponse getResponse() 返回當(dāng)前頁(yè)的ServletResponse對(duì)象(response)
Exception getException() 返回當(dāng)前頁(yè)的Exception對(duì)象(exception)
ServletConfig getServletConfig() 返回當(dāng)前頁(yè)的ServletConfig對(duì)象(config)
ServletContext getServletContext() 返回當(dāng)前頁(yè)的ServletContext對(duì)象(application)
void setAttribute(Stringname,Objectattribute) 設(shè)置屬性及屬性值
void setAttribute(Stringname,Objectobj,intscope) 在指定范圍內(nèi)設(shè)置屬性及屬性值
public ObjectgetAttribute(Stringname) 取屬性的值
Object getAttribute(Stringname,intscope) 在指定范圍內(nèi)取屬性的值
public ObjectfindAttribute(Stringname) 尋找一屬性,返回起屬性值或NULL
void removeAttribute(Stringname) 刪除某屬性
void removeAttribute(Stringname,intscope) 在指定范圍刪除某屬性
int getAttributeScope(Stringname) 返回某屬性的作用范圍
Enumeration getAttributeNamesInScope(intscope) 返回指定范圍內(nèi)可用的屬性名枚舉
void release() 釋放pageContext所占用的資源
void forward(StringrelativeUrlPath) 使當(dāng)前頁(yè)面重導(dǎo)到另一頁(yè)面
void include(StringrelativeUrlPath) 在當(dāng)前位置包含另一文件