为了账号安全,请及时绑定邮箱和手机立即绑定

默认Action跳转问题

我在地址栏上输http://localhost:8080/HelloWorld/helloworld_aaa.action报的还是404错误,不是默认action的网页

helloworld.xml:

<?xml version="1.0" encoding="UTF-8"?>

<!DOCTYPE struts PUBLIC

"-//Apache Software Foundation//DTD Struts Configuration 2.3//EN"

"http://struts.apache.org/dtds/struts-2.3.dtd">

<struts>

<package name="default" namespace="/" extends="struts-default">

<default-action-ref name="index"></default-action-ref>

<action name="index">

<result>/error.jsp</result>

</action>

<action name="helloworld_*" class="com.imooc.action.HelloWorldAction">

<result>{1}.jsp</result>

</action>

</package>

</struts>


正在回答

1 回答

少了一个method="{1}"吧

0 回复 有任何疑惑可以回复我~
#1

qq_与陌Dance_0 提问者

非常感谢!
2017-08-29 回复 有任何疑惑可以回复我~

举报

0/150
提交
取消
Struts2入门
  • 参与学习       95073    人
  • 解答问题       456    个

本教程带你踏上Struts2学习之旅,对Struts2进行更深入讲解

进入课程

默认Action跳转问题

我要回答 关注问题
意见反馈 帮助中心 APP下载
官方微信