wandercooler 2010-03-15 17:45
浏览 255
已采纳

SSH整合初步成功,添加新内容后出错:There is no Action mapped for action name *

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]……


……

检查很多次都发现不了错误的地方。。。
不胜感激!!

  • 写回答

4条回答 默认 最新

  • 拽拽的初行者 2010-03-15 18:36
    关注

    [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了。

    本回答被题主选为最佳回答 , 对您是否有帮助呢?
    评论
查看更多回答(3条)

报告相同问题?

悬赏问题

  • ¥15 delta降尺度计算的一些细节,有偿
  • ¥15 Arduino红外遥控代码有问题
  • ¥15 数值计算离散正交多项式
  • ¥30 数值计算均差系数编程
  • ¥15 redis-full-check比较 两个集群的数据出错
  • ¥15 Matlab编程问题
  • ¥15 训练的多模态特征融合模型准确度很低怎么办
  • ¥15 kylin启动报错log4j类冲突
  • ¥15 超声波模块测距控制点灯,灯的闪烁很不稳定,经过调试发现测的距离偏大
  • ¥15 import arcpy出现importing _arcgisscripting 找不到相关程序