servlet的web.xml說明?

Tags: 作者, 過濾器,

web.xml的講解

工具/原料

eclipse

方法/步驟

log4jConfigLocation

classpath:log4j.properties

context-param元素含有一對引數名log4jConfigLocation和引數值classpath:log4j.properties,作用是為應用的servlet上下文初始化引數。

servlet的web.xml說明

taobao

定義了WEB應用的名字 taobao

servlet的web.xml說明

Taobao is my Test

對專案進行描述

servlet的web.xml說明

hello com.myTest.hello hello /*

定義過濾器

hello 過濾器名字

配置過濾器

/* 適用範圍的請求

作用:就是對使用者的訪問URL請求進行攔截,當前臺一個URL傳遞的時候, /* 過濾以後,呼叫 hello 的值 com.myTest.hello

servlet的web.xml說明

org.springframework.web.context.ContextLoaderListener

它能捕捉到伺服器的啟動和停止,在啟動和停止觸發裡面的方法做相應的操作!

servlet的web.xml說明

snoop SnoopServlet snoop /snoop

servlet的web.xml說明

index.jsp index.html index.htm

歡迎檔案頁配置,如果沒有找到頁面,就從這裡面找

servlet的web.xml說明

404

/404.jsp

發生錯誤 的時候來配置 /404.jsp 頁面

servlet的web.xml說明

120

會話超時(單位為分鐘),如果某個會話在一定時間內120分鐘未被訪問,伺服器就會拋棄這個

servlet的web.xml說明

相關問題答案