J2EE社區(qū)

          茍有恒,何必三更起五更眠;
          最無益,只怕一日曝十日寒.
          posts - 241, comments - 318, trackbacks - 0, articles - 16
                     JSP中的內(nèi)置對(duì)象一共有九個(gè), 由于有的不太常用, 所以總是記不住, 從Sun公司的網(wǎng)站上找到的PDF文檔, 把這一部分放在這里, 以備隨時(shí)查用: 
             
            
                  
          Implicit Objects for Scriptlets
          (JSP Scriplets中的隱含對(duì)象)
          Type
          (對(duì)應(yīng)類型)
          Scope
          (范圍)
           Some Useful Methods (see class or interface for others)
          (常用的方法)
          1 request Subclass of javax.servlet.ServletRequest Request getAttribute, getParameter, getParameterNames, getParameterValues, setAttribute
          2 response Subclass of javax.servlet.ServletResponse Page Not typically used by JSP page authors
          3 pageContext javax.servlet.jsp.PageContext Page findAttribute, getAttribute, getAttributesScope, getAttributeNamesInScope, setAttribute
          4 session javax.servlet.http.HttpSession Session getAttribute, getId, setAttribute
          5 application javax.servlet.ServletContext Application getAttribute, getMimeType, getRealPath, setAttribute
          6 out javax.servlet.jsp.JspWriter Page clear, clearBuffer, flush, getBufferSize, getRemaining
          7 config javax.servlet.ServletConfig Page getInitParameter, getInitParameterNames
          8 page java.lang.Object Page Not typically used by JSP page authors
          9 exception java.lang.Throwable Page getMessage, getLocalizedMessage, printStackTrace, toString
             
              
          JSP十一個(gè)用于EL表達(dá)式的隱含(內(nèi)置)對(duì)象:
          Implicit Objects for EL
          Expressions
          用于EL表達(dá)式的隱含對(duì)象
          Type
          類型
          Description
          具體說明
          pageContext javax.servlet.jsp.PageContext The context for the JSP page. Provides access to various objects, including servletContext, session, request, and response.
          pageScope java.util.Map Maps page-scoped variable names to their values.
          requestScope java.util.Map Maps request-scoped variable names to their values.
          sessionScope java.util.Map Maps session-scoped variable names to their values.
          applicationScope java.util.Map Maps application-scoped variable names to their values.
          param java.util.Map Maps a request parameter to a single String parameter value (obtained by calling ServletReqwuest.getParameter(String name)).
          paramValues java.util.Map Maps a request parameter name to an array of String values for that parameter name (obtained by calling ServletRequest.getParameterValues(String name)).
          header java.util.Map Maps a request header name to a single String header value (obtained by calling ServletRequest.getHeader(String name)).
          headerValues java.util.Map Maps a request header name to an array of String values for that header (obtained by calling ServletRequest.getHeaders(String)).
          coookie java.util.Map Maps a cookie name to a single Cookie object. Cookies are retrieved according to the semantics of HttpServletRequest.getCookies(). If the same name is shared by multiple cookies, an implementation must use the first one encountered in the array of Cookie objects returned by the getCookies() method. However, the ordering of cookies is currently unsspecified in the Servlet specification.
          initParam java.util.Map Maps a context initialization parameter name to a String parameter value (obtained by calling ServletContext.getInitparameter(String name)).



          名稱: ?4C.ESL | .↗Evon
          口號(hào): 遇到新問題?先要尋找一個(gè)方案乄而不是創(chuàng)造一個(gè)方案こ
          mail: 聯(lián)系我


          主站蜘蛛池模板: 普定县| 柳江县| 梅州市| 博乐市| 波密县| 水城县| 邵阳市| 理塘县| 隆回县| 遵义县| 林甸县| 麻城市| 商洛市| 乌兰察布市| 钦州市| 扶风县| 维西| 榆林市| 金昌市| 乐山市| 宁远县| 丹阳市| 遵化市| 炉霍县| 顺昌县| 辛集市| 奉节县| 临海市| 邻水| 五原县| 石棉县| 房产| 荣成市| 出国| 鱼台县| 阿拉尔市| 余江县| 资阳市| 定州市| 沽源县| 襄汾县|