SSH整合,Spring2.5+struts2.0.14+hibernate3.3.
第一次整合的时候用Login登陆功能测试成功,后来添加一个基本信息添加的功能之后,出错信息如下:
2010-03-15 17:12:25,281 ERROR [org.apache.struts2.dispatcher.Dispatcher] - Could not find action or result
There is no Action mapped for action name CarinfoInput. - [unknown location]
按出错信息提示应该是Action mapped不对,但是相同的方法,Login.do又可以用!
附上
[color=blue]web.xml[/color]
<?xml version="1.0" encoding="UTF-8"?>
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">
contextConfigLocation
classpath:applicationContext.xml
log4jConfigLocation
/WEB-INF/log4j.properties
org.springframework.web.util.Log4jConfigListener
org.springframework.web.context.ContextLoaderListener
struts2
org.apache.struts2.dispatcher.FilterDispatcher
struts2
/*
<welcome-file-list>
<welcome-file>index.jsp</welcome-file>
</welcome-file-list>
[color=blue]struts.xml[/color]
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE struts PUBLIC
"-//Apache Software Foundation//DTD Struts Configuration 2.0//EN"
"http://struts.apache.org/dtds/struts-2.0.dtd">
/WEB-INF/error.jsp
/WEB-INF/main.jsp
[color=red]
/framesets.jsp
/index.jsp
[/color]
/index.jsp
[color=red]
/commonjsp/inputsuccess.jsp
/commonjsp/inputfail.jsp
[/color]
[color=blue]carinput.jsp[/color]
……
[color=blue]login.jsp[/color]……
检查很多次都发现不了错误的地方。。。
不胜感激!!
[quote]http://localhost:8080/guangyuanoa/imformation/CarinfoInput.do
正确的应该是:
http://localhost:8080/guangyuanoa/CarinfoInput.do
[/quote]
一定是你的
所在的页面是http://localhost:8080/guangyuanoa/imformation/xXX.jsp形式,
在Action翻译时,以imformation为基点,翻译为imformation/CarinfoInput.do了。
查看一下,Spring的配置文件中id为carinfoAction的bean是否配置?
你把 input的方法名改一下,试试吧?
1、在Action中的input方法名改一下
2、相应的 配置文件中中input方法名改下。
错误堆栈没有改变?
检查 /commonjsp/inputsuccess.jsp 文件是否存在?
检查