46—SSH集成第181—184节.pptVIP

  • 0
  • 0
  • 约8.99千字
  • 约 40页
  • 2017-03-27 发布于四川
  • 举报
46—SSH集成第181—184节

3、添加struts2.X架包 Evaluation only. Created with Aspose.Slides for .NET 3.5 Client Profile . Copyright 2004-2011 Aspose Pty Ltd. 3、添加struts2.X架包 Evaluation only. Created with Aspose.Slides for .NET 3.5 Client Profile . Copyright 2004-2011 Aspose Pty Ltd. 3、添加struts2.X架包 说明:最好手动添加struts2.X包如下: Evaluation only. Created with Aspose.Slides for .NET 3.5 Client Profile . Copyright 2004-2011 Aspose Pty Ltd. 4、添加 asm3.3.jar 和数据库驱动 由于是高版本集成,需要版本ASM的架包,即: ASM字节码库 动态代理用。 Evaluation only. Created with Aspose.Slides for .NET 3.5 Client Profile . Copyright 2004-2011 Aspose Pty Ltd. 三、各种配置文件的配置 Evaluation only. Created with Aspose.Slides for .NET 3.5 Client Profile . Copyright 2004-2011 Aspose Pty Ltd. 1、web.xml文件配置(WebRoot\WEB-INF下) ?xml version=1.0 encoding=UTF-8? web-app version=2.5 xmlns=/xml/ns/javaee xmlns:xsi=/2001/XMLSchema-instance xsi:schemaLocation=/xml/ns/javaee /xml/ns/javaee/web-app_2_5.xsd context-param param-namecontextConfigLocation/param-name param-valueclasspath:beans.xml/param-value /context-param !-- 对Spring容器进行实例化 -- listener listener-classorg.springframework.web.context.ContextLoaderListener/listener-class /listener welcome-file-list welcome-fileindex.jsp/welcome-file /welcome-file-list filter filter-namestruts2/filter-name filter-class org.apache.struts2.dispatcher.ng.filter.StrutsPrepareAndExecuteFilter /filter-class /filter filter-mapping filter-namestruts2/filter-name url-pattern*.action/url-pattern /filter-mapping /web-app Evaluation only. Created with Aspose.Slides for .NET 3.5 Client Profile . Copyright 2004-2011 Aspose Pty Ltd. 2、struts.xml配置(src下) ?xml version=1.0 encoding=UTF-8 ? !DOCTYPE struts PUBLIC -//Apache Software Foundation//DTD Struts Configuration 2.1//EN /dtds/struts-2.1.dtd struts !-- 指定Web应用的默认编码集,相当于调用HttpServletRequest的setCharacterEncoding方法 -- constant name=struts.i18n.encoding value=gbk/ !-- 该属性指定需要Struts 2处理的请求后缀,该属性的默认值是action,即所有匹配*.action的请求都由St

文档评论(0)

1亿VIP精品文档

相关文档