SSH常用配置+web.xml配置
来源:互联网 发布:沙漠靴品牌知乎 编辑:程序博客网 时间:2024/05/16 05:10
struts2
<?xml version="1.0" encoding="UTF-8"?><!DOCTYPE struts PUBLIC"-//Apache Software Foundation//DTD Struts Configuration 2.1.7//EN""http://struts.apache.org/dtds/struts-2.3.dtd"><struts><constant name="struts.ui.theme" value="simple"></constant><constant name="struts.devMode" value="true"></constant><constant name="struts.objectFactory" value="spring"></constant><include file="struts2/struts-test.xml" /></struts>
hibernate
<?xml version="1.0" encoding="UTF-8"?><!DOCTYPE hibernate-configuration PUBLIC"-//Hibernate/Hibernate Configuration DTD 3.0//EN""http://hibernate.sourceforge.net/hibernate-configuration-3.0.dtd"><hibernate-configuration><session-factory><!-- 数据库链接信息 --><property name="hibernate.connection.driver_class">com.mysql.jdbc.Driver</property><property name="hibernate.connection.url">jdbc:mysql://localhost:3306/jkdb?characterEncoding=UTF-8</property><property name="hibernate.connection.username">root</property><property name="hibernate.connection.password">root</property><!-- 基础配置 --><property name="hibernate.dialect">org.hibernate.dialect.MySQL5Dialect</property><!--property name="hibernate.hbm2ddl.auto">update</property --><property name="hibernate.connection.autocommit">true</property><!-- property name="hibernate.format_sql">true</property --><property name="show-sql">true</property><!-- 加载映射文件 --><mapping resource="cn/itcast/entity/TestTable.hbm.xml" /></session-factory></hibernate-configuration>
spring
<?xml version="1.0" encoding="UTF-8"?><beans xmlns="http://www.springframework.org/schema/beans"xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"xmlns:aop="http://www.springframework.org/schema/aop"xmlns:tx="http://www.springframework.org/schema/tx"xmlns:context="http://www.springframework.org/schema/context"xsi:schemaLocation="http://www.springframework.org/schema/beanshttp://www.springframework.org/schema/beans/spring-beans-3.0.xsdhttp://www.springframework.org/schema/aophttp://www.springframework.org/schema/aop/spring-aop-3.0.xsdhttp://www.springframework.org/schema/contexthttp://www.springframework.org/schema/context/spring-context-3.0.xsdhttp://www.springframework.org/schema/txhttp://www.springframework.org/schema/tx/spring-tx-3.0.xsd"><!-- 1:创建SessionFactory对象,这是spring整合Hibernate的核心 --><bean id="sessionFactory" class="org.springframework.orm.hibernate3.LocalSessionFactoryBean"><property name="configLocation"><value>classpath:hibernate.cfg.xml</value></property></bean><!-- 2:加载DAO对象 --><bean id="daoRoot" class="cn.itcast.entity.dao._RootDAO" autowire="byName"/><bean id="daoTestTable" class="cn.itcast.entity.dao.TestTableDAO" autowire="byName"/></beans>
web.xml
<?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/javaeehttp://java.sun.com/xml/ns/javaee/web-app_2_5.xsd"><!-- 当web容器启动的时候,加载spring容器(beans.xml) --><context-param><param-name>contextConfigLocation</param-name><param-value>classpath:beans.xml</param-value></context-param><listener><listener-class>org.springframework.web.context.ContextLoaderListener</listener-class></listener><!-- 配置struts2的过滤器,这是struts2运行的核心 --><filter><filter-name>struts2</filter-name><filter-class>org.apache.struts2.dispatcher.ng.filter.StrutsPrepareAndExecuteFilter</filter-class></filter><filter-mapping><filter-name>struts2</filter-name><url-pattern>/*</url-pattern></filter-mapping><welcome-file-list><welcome-file>index.jsp</welcome-file></welcome-file-list></web-app>
0 0
- SSH常用配置+web.xml配置
- SSH配置:web.xml
- SSH web.xml配置
- SSH web.xml配置
- SSH web.xml配置
- web.xml 常用配置
- web.xml常用配置
- web.xml常用配置
- SSH中的web.xml配置
- SSH配置之web.xml
- SSH配置之web.xml .
- ssh的web.xml配置
- SSH web.xml配置详解
- SSH配置之web.xml .
- SSH配置之web.xml
- ssh web.xml配置分析
- SSH配置之web.xml
- web.xml 常用的配置
- JS高级第三天:
- JS第四天:
- 解决启动myeclipse报错:building workspace的问题(转)
- JS高级第五天:
- 全文检索(lucene)
- SSH常用配置+web.xml配置
- 杰信项目第二天之poi-导出工作表+小细节
- 杰信项目第三天知识点(工作表模板+动态生成目录+动态生成重名文件+购销合同增删改查)
- 杰信项目第四天(购销合同,货物信息,附件信息三表联查)
- 杰信项目第五天(合同复制+合同查看+出货表)
- 杰信个项目第六天
- 丑数(数论)
- HTML在线编辑器之xhEditor
- Web 通信 之 长连接、长轮询