<?xml version="1.0" encoding="UTF-8"?>
<web-app version="2.5" xmlns="http://java.sun.com/xml/ns/javaee" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/web-app_2_5.xsd"><!-- **********JSF参数设置************************************* --><context-param><description>详见:javax.faces.application.ProjectStage类可取值:DevelopmentUnitTestSystemTestProduction</description><param-name>javax.faces.PROJECT_STAGE</param-name><param-value>Development</param-value></context-param><context-param><description>指示是在客户端(client)还是在服务器端(server)保存UI组件的状态和session信息, server表示保存到服务器端,client表示保存到客户端,默认为server。</description><param-name>javax.faces.STATE_SAVING_METHOD</param-name><param-value>client</param-value></context-param><context-param><description>当使用扩展名映射(后缀映射)时,所使用的资源的默认后缀默认为.jsp,它自于javax.faces.application.ViewHandler类中的常量. 常量的名字是 DEFAULT_SUFFIX 值相当于 ".jsp"</description><param-name>javax.faces.DEFAULT_SUFFIX</param-name><param-value>.xhtml</param-value></context-param><!--<context-param><description>当在这个应用中处理JSF请求时,所使用的生命周期实例的标识符.默认的生命周期模型</description><param-name>javax.faces.LIFECYCLE_ID</param-name><param-value></param-value></context-param>--><!-- ********************************************************* --><context-param><description>逗号分隔的上下文相关的资源路径列表,JSF将在装载WEB-INF/faces-config.xml之前载入这些资源</description><param-name>javax.faces.CONFIG_FILES</param-name><param-value>/WEB-INF/faces-config.xml</param-value></context-param><context-param><description>设置自定义的Facelets标签库文件路径</description><param-name>javax.faces.FACELETS_LIBRARIES</param-name><param-value>/WEB-INF/guessnumber.taglib.xml</param-value></context-param><!-- ********************************************************* --> <context-param><description>Set this flag to true if you want the JSFReference Implementation to verify that all of the applicationobjects you have configured (components, converters,renderers, and validators) can be successfully created.Default value is false.告诉JSF验证其可以创建应用对象(组件,呈现器,转换器等), 那么设置标志为true, 默认值为false。</description><param-name>com.sun.faces.verifyObjects</param-name><param-value>false</param-value></context-param><context-param><description>Set this flag to true if you want the JavaServer FacesReference Implementation to validate the XML in yourfaces-config.xml resources against the DTD. Defaultvalue is false. 告诉JSF根据DTD验证配置文件,那么设置标志为true, 默认值为false。</description><param-name>com.sun.faces.validateXml</param-name><param-value>false</param-value></context-param><!--<context-param><description>资源更新检查周期</description><param-name>com.sun.faces.resourceUpdateCheckPeriod</param-name><param-value>-1</param-value></context-param><context-param><description>当状态保存方法设置为server时,控制会话中保存的视图数量.无默认值</description><param-name>com.sun.faces.NUMBER_OF_VIEWS_IN_SESSION</param-name><param-value>-1</param-value></context-param>--><!-- ********************************************************* --><!--<context-param><description>Setting this to true will cause the FaceletViewHandlerto print out debug information in an easy to use screenwhen an error occurs during the rendering process。很显然,为了方便开发,我们应该设置。</description><param-name>facelets.DEVELOPMENT</param-name><param-value>true</param-value></context-param><context-param><param-name>facelets.SKIP_COMMENTS</param-name><param-value>true</param-value></context-param>--><!-- **********JSF基本设置************************************* --><!-- Faces Servlet --><servlet><servlet-name>Faces Servlet</servlet-name><servlet-class>javax.faces.webapp.FacesServlet</servlet-class><load-on-startup>1</load-on-startup></servlet><!-- Faces Servlet Mapping --><!--This mapping identifies a jsp page as having JSF content.  If arequest comes to the server for foo.faces, the container willsend the request to the FacesServlet, which will expect acorresponding foo.jsp page to exist containing the content.--><servlet-mapping><servlet-name>Faces Servlet</servlet-name><url-pattern>*.faces</url-pattern><!--<url-pattern>*.xhtml</url-pattern<url-pattern>*.jsf</url-pattern><url-pattern>/faces/*</url-pattern>--></servlet-mapping><!-- **********Web基本设置************************************ --><session-config><session-timeout>30</session-timeout></session-config><welcome-file-list><welcome-file>index.html</welcome-file><welcome-file>index.jsp</welcome-file><welcome-file>index.xhtml</welcome-file></welcome-file-list><!-- **********安全设置**************************************** --><login-config><auth-method>FORM</auth-method><realm-name/><form-login-config><form-login-page>/login.jsp</form-login-page><form-error-page>/loginerror.jsp</form-error-page></form-login-config></login-config><security-role><role-name>manager</role-name></security-role><security-role><role-name>employee</role-name></security-role><security-constraint><web-resource-collection><web-resource-name>jsf</web-resource-name><description>javaserver faces</description><url-pattern>/security/*</url-pattern></web-resource-collection><auth-constraint><role-name>manager</role-name><role-name>employee</role-name></auth-constraint></security-constraint>
</web-app>

转载于:https://my.oschina.net/liangzhenghui/blog/175556

JSF的web.xml配置相关推荐

  1. 在tomcat下部署两个或多个项目时 log4j和web.xml配置webAppRootKey 的问题(转)

    在tomcat下部署两个或多个项目时 web.xml文件中最好定义webAppRootKey参数,如果不定义,将会缺省为"webapp.root",如下: <!-- 应用路径 ...

  2. sevlet表单处理无法相应问题及web.xml配置.

    这几天学习sevlet,对于小白来说配置就是一个很操蛋的事情.有一个很重要的就是路径问题. 首先架构如下: 因为我的test1.html是写在cainiao文件夹里面,如果直接调用action=hel ...

  3. 160329(二)、web.xml配置详解

    1.启动一个WEB项目的时候,WEB容器会去读取它的配置文件web.xml,读取<listener>和<context-param>两个结点. 2.紧急着,容创建一个Servl ...

  4. 基于注解的Spring MVC(所需jar包,web.xml配置,Spring文件配置,@Controller,@RequestMapping,@RequestParam,model填参,EL取值)

    1.添加jar 2.web.xml配置: <?xml version="1.0" encoding="UTF-8"?> <web-app ve ...

  5. 基于XML配置的Spring MVC(所需jar包,web.xml配置,处理器配置,视图解析器配置)

    1.添加jar 2.web.xml配置 <?xml version="1.0" encoding="UTF-8"?> <web-app ver ...

  6. Tomcat web.xml配置参数详解

    Apache Tomcat Configuration Reference - The Context Container https://tomcat.apache.org/tomcat-5.5-d ...

  7. Spring MVC的web.xml配置详解(转)

    出处http://blog.csdn.net/u010796790 1.spring 框架解决字符串编码问题:过滤器 CharacterEncodingFilter(filter-name)  2.在 ...

  8. tomcat web.xml配置

    tomcat 禁用不安全的http请求方式(转)  1:我的配置 web.xml(url下禁用的请求方式)  <security-constraint>  <web-resource ...

  9. Servlet容器中web.xml配置context-param与init-param

    Servlet容器中web.xml配置<context-param>与<init-param>的区别与作用 <context-param>的作用: web.xml的 ...

最新文章

  1. CSS3 (animation)
  2. Android -- 带你从源码角度领悟Dagger2入门到放弃(三)
  3. Windows事件等待学习笔记(三)—— WaitForSingleObject函数分析
  4. HDFS集群balance(3)-- 架构细节
  5. TensorFlow学习笔记(二十一) tensorflow机器学习模型
  6. Spring 中的事件处理
  7. C语言试题三十之请编写函数function对长度位7个字符的字符串,除首尾字符外,将其余5个字符按ascii码降序排列。
  8. linux 终端调用MATLAB程序
  9. PLSQL Developer工具远程连接Oracle数据库的方法
  10. IQ不平衡数字域校准方案
  11. HTML+css中鼠标经过触发等问题
  12. Android系统屏幕亮度调节Brightness
  13. jQuery Color Animate (jQuery 颜色变换动画) 插件
  14. 打开html按钮没文字,为什么我打开网页有些字没显示但能点击
  15. ubuntu下使用testerSunshine12306抢票程序
  16. QT 对话框添加背景图片的方法
  17. Android 手机遥控器添加模拟鼠标功能
  18. 关于将微信小程序部署到云服务器上的具体步骤
  19. 【华为机试真题 Python】窗口滑动和最大值
  20. 黑马程序员—【教学软件】广播软件下载

热门文章

  1. Struts2s:select/s:select
  2. Codeforces Round #582 (Div. 3)
  3. js中cookic的存取
  4. Codeforces Round #315 (Div. 2)
  5. 用 CSS 做轮播图
  6. AXMLPrinter2.jar反编译xml文件
  7. [iphone]XML 解析 之 TBXML 介绍
  8. Unity 配置:typeConverter的使用
  9. 梯度下降法,牛顿法,高斯-牛顿迭代法,附代码实现
  10. [译]在CUDA C/C++中如何衡量代码性能