国产一级a片免费看高清,亚洲熟女中文字幕在线视频,黄三级高清在线播放,免费黄色视频在线看

打開APP
userphoto
未登錄

開通VIP,暢享免費電子書等14項超值服

開通VIP
JSP中web配置:web.xml
比較常用的設定,詳細請看:http://java.sun.com/xml/ns/j2ee/web-app_2_4.xsd
XML聲明,定義XML的版本、編碼格式。還有最重要的schema的來源
<?xml version="1.0" encoding="UTF-8"?>
<web-app xmlns="http://java.sun.com/xml/ns/j2ee" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://java.sun.com/xml/ns/j2ee http://java.sun.com/xml/ns/j2ee/web-app_2_4.xsd" version="2.4">
  .......
</web-app>
 
<description>
當servlet的URL定義為其他文件類型的擴展名,該文件類型將不能訪問,而訪問了servlet
<?xml version="1.0" encoding="UTF-8"?>
<web-app xmlns="http://java.sun.com/xml/ns/j2ee" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://java.sun.com/xml/ns/j2ee http://java.sun.com/xml/ns/j2ee/web-app_2_4.xsd" version="2.4">
  <display-name>myweb</display-name><!--站點名稱-->
  <description>這里是站點描述</description>
  <icon>
    <small-icon>/images/small.gif</small-icon><!--小圖標的路徑16*16,必須為gif jpge格式-->
    <large-icon>/images/large.gif</large-icon><!--大圖標的路徑32*32,必須為gif jpge格式-->
  </icon>
  <!--如果存在<distributable/>則代表該站點能在多個JSP Container之間分散執(zhí)行(分布式)-->
  <distributable/>




  <context-param><!--環(huán)境參數(shù),設置常量,取得常量  this.getInitParameter("context");-->
    <param-name>context</param-name>
    <param-value>10000</param-value>
  </context-param>
  <filter><!--聲明filter-->

    <filter-name>filterName</filter-name>
    <filter-class>filter.filterName</filter-class>
    <init-param>
      <param-name>encoding</param-name>
      <param-value>UTF-8</param-value>
    </init-param>
  </filter>
  <filter-mapping><!--定義filter所對應的URL-->
  <filter-name>filterName</filter-name>
  <url-pattern>/filterName</url-pattern>
  <dispatcher>REQUEST|INCLUDE|FORWARD|ERROR</dispatcher><!--filter對應的請求方式,有4種方式,默認REQUEST-->
  </filter-mapping>
  <listener><!--設定Listener接口-->
    <listener-class>listener.ListenerClassName</listener-class>
  </listener>
  <servlet><!--聲明servlet的數(shù)據(jù)-->
  <servlet-name>servletName</servlet-name>
  <servlet-class>servlet.servletName</servlet-class>
  <init-param><!--初始化參數(shù),可以在init()中使用ServletConfig().getInitParamenter("name")取得-->
    <param-name>name</param-name>
    <param-value>123</param-value>
  </init-param>
  <load-on-startup>n</load-on-startup><!--站點啟動時,此servlet會被自動加載執(zhí)行,1表示最早,2,3...-->

  </servlet>
  <servlet-mapping><!--定義servlet所對應的URL-->

    <servlet-name>name</servlet-name>
    <url-pattern>/name</url-pattern>
  </servlet-mapping>
  <session-config><!--設置session超時時間(20分鐘)默認按服務器配置-->
    <session-timeout>20</session-timeout>
  </session-config>
  <mime-mapping><!--定義某個擴展名和某個MIME Type做映射-->
    <extension>doc</extension>
    <mime-type>application/vnd.ms-word</mime-type>
  </mime-mapping>
  <welcome-file-list><!--設置首頁列表-->
  <welcome-file>index.jsp</welcome-file>
  </welcome-file-list>
  <error-page><!--將錯誤代碼對應到WEB站點的資源路徑-->
  <error-code>錯誤代碼</error-code>Exception
  <location>/路徑/</location>

  </error-page>
  <error-page><!--將異常的種類對應到WEB站點的資源路徑-->
  <exception-type>Exception</exception-type>
  <location>/路徑/</location>

  </error-page>

  <jsp-config><!--JSP的相關配置-->
    <taglib><!--JSP所用到的Tag Library-->
      <taglib-uri>URI</taglib-uri>
      <taglib-location>/WEB-INF/lib/xxx.tld</taglib-location>
    </taglib>
    <jsp-property-group>
      <description>此設定的說明</description>
      <display-name>Name</display-name>
      <url-pattern>URL</url-pattern><!--此設定影響的范圍-->
      <el-ignored>true|false</el-ignored><!--true表示不支持EL語法-->
      <scripting-invalid>encoding</scripting-invalid><!--jsp的編碼-->
      <include-coda>...jspf</include-coda><!--JSP的結尾,擴展名.jspf-->
    </jsp-property-group>
  </jsp-config>
  <resource-ref><!--利用JNDI取得站點可利用的資源-->
    <description>資源說明</description>
    <res-ref-name>資源名稱</res-ref-name>
    <res-type>資源種類</res-type>
    <res-auth>Application|Container</res-auth><!--資源經(jīng)由什么許可-->
    <res-sharing-scope>Shareable|Unshareable</res-sharing-scope><!--資源是否可以共享,默認為Shareable-->
  </resource-ref>
</web-app>
本站僅提供存儲服務,所有內(nèi)容均由用戶發(fā)布,如發(fā)現(xiàn)有害或侵權內(nèi)容,請點擊舉報。
打開APP,閱讀全文并永久保存 查看更多類似文章
猜你喜歡
類似文章
web.xml文件的作用
Spring MVC 能夠直接訪問jsp頁面
SSH框架 web.xml配置
tomcat web.xml配置
web工程中的web.xml
web開發(fā)的瑞士軍刀 javawebparts
更多類似文章 >>
生活服務
分享 收藏 導長圖 關注 下載文章
綁定賬號成功
后續(xù)可登錄賬號暢享VIP特權!
如果VIP功能使用有故障,
可點擊這里聯(lián)系客服!

聯(lián)系客服