SSH集成错误,请高手解决,HTTP Status 500 - No action instance for path /user could be created
月影传说 2009-04-07 10:37:20 控制台不报错,页面错误如下:
HTTP Status 500 - No action instance for path /user could be created
--------------------------------------------------------------------------------
type Status report
message No action instance for path /user could be created
description The server encountered an internal error (No action instance for path /user could be created) that prevented it from fulfilling this request.
--------------------------------------------------------------------------------
Apache Tomcat/6.0.16
applicationContext.xml文件放在了WEB-INF下,配置如下:
<?xml version="1.0" encoding="UTF-8"?>
<beans
xmlns="http://www.springframework.org/schema/beans"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-2.0.xsd">
<bean id="dataSource"
class="org.apache.commons.dbcp.BasicDataSource">
<property name="driverClassName"
value="com.microsoft.sqlserver.jdbc.SQLServerDriver">
</property>
<property name="url"
value="jdbc:sqlserver://localhost:1433;DatabaseName=zf">
</property>
<property name="username" value="sa"></property>
<property name="password" value="sa"></property>
</bean>
<bean id="sessionFactory"
class="org.springframework.orm.hibernate3.LocalSessionFactoryBean">
<property name="dataSource">
<ref bean="dataSource"></ref>
</property>
<property name="hibernateProperties">
<props>
<prop key="hibernate.dialect">
org.hibernate.dialect.SQLServerDialect
</prop>
</props>
</property>
<property name="mappingResources">
<list>
<value>entity/TblUser.hbm.xml</value>
<value>entity/TUser.hbm.xml</value>
<value>entity/Goods.hbm.xml</value>
<value>entity/Bid.hbm.xml</value></list>
</property>
</bean>
<bean id="userDao" class="dao.impl.UserDaoImpl" abstract="false"
lazy-init="default" autowire="default" dependency-check="default">
<property name="sessionFactory">
<ref bean="sessionFactory"></ref>
</property>
</bean>
<bean id="userBiz" class="biz.impl.UserBizImpl" abstract="false"
lazy-init="default" autowire="default" dependency-check="default">
<property name="userDao">
<ref bean="userDao"></ref>
</property>
</bean>
<bean name="/user" class="web.action.UserAction" abstract="false"
lazy-init="default" autowire="default" dependency-check="default">
<property name="userBiz">
<ref bean="userBiz"></ref>
</property>
</bean></beans>
struts配置文件如下:
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE struts-config PUBLIC "-//Apache Software Foundation//DTD Struts Configuration 1.2//EN" "http://struts.apache.org/dtds/struts-config_1_2.dtd">
<struts-config>
<data-sources />
<form-beans >
<form-bean name="userForm" type="web.form.UserForm" />
</form-beans>
<global-exceptions />
<global-forwards />
<action-mappings >
<action
attribute="userForm"
input="/user.jsp"
name="userForm"
parameter="operate"
path="/user"
scope="request"
type="org.springframework.web.struts.DelegatingActionProxy">
<forward name="index" path="/index.jsp" />
<forward name="error" path="/error.jsp" />
</action>
</action-mappings>
<message-resources parameter="struts.ApplicationResources" />
<plug-in className="org.springframework.web.struts.ContextLoaderPlugIn">
<set-property property="contextConfigLocation"
value="/WEB-INF/applicationContext.xml"/>
</plug-in>
</struts-config>
若将<action
attribute="userForm"
input="/user.jsp"
name="userForm"
parameter="operate"
path="/user"
scope="request"
type="org.springframework.web.struts.DelegatingActionProxy">
<forward name="index" path="/index.jsp" />
<forward name="error" path="/error.jsp" />
</action>
改为
<action
attribute="userForm"
input="/user.jsp"
name="userForm"
parameter="operate"
path="/user"
scope="request"
type="web.action.UserAction">
<forward name="index" path="/index.jsp" />
<forward name="error" path="/error.jsp" />
</action>
就没有错误,请高手看看到底错在哪里了?