1. 程式人生 > >jsp的 內建物件

jsp的 內建物件


   JspWriter getOut() 返回當前客戶端響應被使用的JspWriter流(out) 
   HttpSession getSession() 返回當前頁中的HttpSession物件(session) 
   Object getPage() 返回當前頁的Object物件(page) 
   ServletRequest getRequest() 返回當前頁的ServletRequest物件(request) 
   ServletResponse getResponse() 返回當前頁的ServletResponse物件(response) 
   Exception getException() 返回當前頁的Exception物件(exception) 
   ServletConfig getServletConfig() 返回當前頁的ServletConfig物件(config) 
   ServletContext getServletContext() 返回當前頁的ServletContext物件(application) 
   void setAttribute(String name,Object attribute) 設定屬性及屬性值 
   void setAttribute(String name,Object obj,int scope) 在指定範圍內設定屬性及屬性值 
   public Object getAttribute(String name) 取屬性的值 
   Object getAttribute(String name,int scope) 在指定範圍內取屬性的值 
   public Object findAttribute(String name) 尋找一屬性,返回起屬性值或NULL 
   void removeAttribute(String name) 刪除某屬性 
   void removeAttribute(String name,int scope) 在指定範圍刪除某屬性 
   int getAttributeScope(String name) 返回某屬性的作用範圍 
   Enumeration getAttributeNamesInScope(int scope) 返回指定範圍內可用的屬性名列舉 
   void release() 釋放pageContext所佔用的資源 
   void forward(String relativeUrlPath) 使當前頁面重導到另一頁面 
   void include(String relativeUrlPath) 在當前位置包含另一檔案