Struts 空白页面

来源:百度知道 编辑:UC知道 时间:2024/05/18 01:14:03
遇到个奇怪的问题:我在struts的配置文件中写
<action="/XXXX" forward="XXX">时页面跳转正常,但改成
<action="/XXXX" type="XXXXX">
<forward name="success" path="XXXXX">
</action>,页面跳转后居然甚么都不显示,tomcat没有报任何错误...这是怎么回事啊?高手们麻烦指点一下,3Q
To liuz_ok:改过之后报错了,错误如下:
No action instance for path /toModifyCommodityInfo could be created

<action="/XXXX" type="XXXXX">
<forward name="success" path="XXXXX">
</action>
这个你这样改试试
<action="/XXXX">
<forward name="success" path="/XXX.jsp">
</action>

path="/XXX.jsp"应指到你要跳转页面的路径

补充:
No action instance for path /toModifyCommodityInfo could be created
这个错误你检查:
你的type=""中写的action类是不是写正确了;
path="/##"是否正确。
给你个例子:
<action-mappings >
<action
input="/error.jsp"
name="mailForm"
path="/sendmail"
scope="request"
type="com.mail.action.MailAction"
validate="false">
<forward name="success" path="/success.jsp" />
<forward name="error" path="/error.jsp"/><