JSF技术web.xml配置解析

对Java tutorial-examples中jsf hell1的web.xml配置文件的解析

 1 <?xml version="1.0" encoding="UTF-8"?>
 2 <web-app version="3.1" 
 3          xmlns="http://xmlns.jcp.org/xml/ns/javaee" 
 4          xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" 
 5          xsi:schemaLocation="http://xmlns.jcp.org/xml/ns/javaee http://xmlns.jcp.org/xml/ns/javaee/web-app_3_1.xsd">
 6     <context-param><!--描述了这个JSF应用程序在开发生命周期中的位置,有效值为 “ Development”,“ UnitTest”,“ SystemTest”或“ Production”-->
 7         <param-name>javax.faces.PROJECT_STAGE</param-name>
 8         <param-value>Development</param-value>
 9     </context-param>
10     <servlet><!--JSF核心控制器 Faces Servlet-->
11         <servlet-name>Faces Servlet</servlet-name><!--我们注册使用的组件名 Faces Servlet-->
12         <servlet-class>javax.faces.webapp.FacesServlet</servlet-class><!--指向注册组件类的地址-->
13         <load-on-startup>1</load-on-startup><!--启动顺序,让这个servlet随servlet容器一起启动-->
14     </servlet>
15     <servlet-mapping>
16         <servlet-name>Faces Servlet</servlet-name>
17         <url-pattern>*.xhtml</url-pattern><!--配置访问路径-->
18     </servlet-mapping>
19     <session-config><!--会话超时配置-->
20         <session-timeout>
21             30
22         </session-timeout>
23     </session-config>
24     <welcome-file-list><!--指定欢迎页面 index.xhtml-->
25         <welcome-file>index.xhtml</welcome-file>
26     </welcome-file-list>
27 </web-app>
原文地址:https://www.cnblogs.com/yuanchao-blog/p/10583588.html