web.xml内容:
<filter>
<filter-name>struts2</filter-name>
<filter-class>
org.apache.struts2.dispatcher.FilterDispatcher
</filter-class>
</filter> <filter-mapping>
<filter-name>struts2</filter-name>
<url-pattern>/*</url-pattern>
</filter-mapping>
<listener>
<listener-class>
org.springframework.web.context.ContextLoaderListener
</listener-class>
</listener>
<filter>
<filter-name>struts2</filter-name>
<filter-class>
org.apache.struts2.dispatcher.FilterDispatcher
</filter-class>
</filter> <filter-mapping>
<filter-name>struts2</filter-name>
<url-pattern>/*</url-pattern>
</filter-mapping>
<listener>
<listener-class>
org.springframework.web.context.ContextLoaderListener
</listener-class>
</listener>
解决方案 »
- 求老鸟指点!!做个酒店管理系统是用swing做还是web做!!
- 赞同科技这家公司怎么样啊?
- hibernate查询数据丢失
- 急!急!!急!!!Hibernate多表查询并分组统计语句怎么写,在线等答案。
- hibernate为什么查不出来呢?
- SpringIOC中集合类型的装配问题
- java通过jni怎么调用c#生成的dll
- 对struts+hibernate的一点不解,再线等/1高人指点下1谢谢!!!
- 在线等一个xml和xsl的问题
- 关于JTable的问题……
- weblogic集群+apache如何设计架构,求中间件高手!
- 关于struts2传递参数的Error setting expression '*' with value '*’问题
<?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:p="http://www.springframework.org/schema/p"
xsi:schemaLocation="http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-3.0.xsd">
<bean id="dataSource" class="org.apache.commons.dbcp.BasicDataSource" destroy-method="close">
<property name="driverClassName" value="oracle.jdbc.driver.OracleDriver"></property>
<property name="url" value="jdbc:oracle:thin:@se02:1521:KJ509"></property>
<property name="username" value="user_509"></property>
<property name="password" value="system"></property>
<property name="maxActive" value="100"></property>
<property name="maxIdle" value="30"></property>
<property name="maxWait" value="500"></property>
<property name="defaultAutoCommit" value="true"></property>
</bean>
<bean id="sessionFactory" class="org.springframework.orm.hibernate3.LocalSessionFactoryBean">
<property name="dataSource" ref="dataSource"></property>
<property name="hibernateProperties">
<props>
<prop key="hibernate.dialect">org.hibernate.dialect.Oracle9Dialect</prop>
<prop key="hibernate.show_sql">true</prop>
</props>
</property>
<property name="mappingResources">
<list>
<value>com/testSpring3/bean/User.hbm.xml</value>
</list>
</property>
</bean>
<bean id="userDao" class="com.testSpring3.dao.impl.UserDAOImpl" scope="singleton">
<property name="sessionFactory">
<ref bean="sessionFactory"/>
</property>
</bean>
<bean id="userService" class="com.testSpring3.service.impl.UserServiceImpl">
<property name="userDao" ref="userDao"></property>
</bean>
<bean id="saveUserAction" class="com.testSpring3.action.user.SaveUserAction" scope="prototype">
<property name="service" ref="userService"></property>
</bean>
<bean id="listUserAction" class="com.testSpring3.action.user.ListUserAction" scope="prototype">
<property name="service" ref="userService"></property>
</bean></beans>
dataSoursedataSource
url貌似不对吧,thin:@后面应该是ip地址啊
dataSourse--------引用的时候有些地方把dataSource写成了dataSourse