zmzimpl 2017-01-17 15:09 采纳率: 0%
浏览 2257

刚学Struts2,访问index.jsp页面正常,访问login.jsp页面就报错

我用的是通配符的方式访问,输入
http://localhost:8088/TestStruts/TestStruts_index.action时可以跳转到index.jsp页面,
但输入http://localhost:8088/TestStruts/TestStruts_login.action时,
就报There is no Action mapped for namespace [/] and action name [TestStruts_login] associated with context path [/TestStruts].

struts.xml代码如下:

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

<!DOCTYPE struts PUBLIC

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

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


<constant name="struts.i18n.encoding" value="UTF-8"></constant>

<constant name="struts.action.extension" value="do,action"></constant>

<constant name="struts.serve.static.browserCache" value="false"></constant>

<constant name="struts.configuration.xml.reload" value="true"></constant>

<constant name="struts.devMode" value="true"></constant>

<constant name="struts.enable.DynamicMethodInvocation" value="false"></constant>


<package name="default" namespace="/" extends="struts-default">
    <action name="*_*" method="{2}" class="com.test.action.{1}" >
        <result name="login">/login.jsp</result>
        <result name="index">/{2}.jsp</result>
    </action>


</package>

麻烦大神解惑~

  • 写回答

5条回答 默认 最新

  • devmiao 2017-01-17 15:52
    关注
    评论

报告相同问题?

悬赏问题

  • ¥15 执行 virtuoso 命令后,界面没有,cadence 启动不起来
  • ¥50 comfyui下连接animatediff节点生成视频质量非常差的原因
  • ¥20 有关区间dp的问题求解
  • ¥15 多电路系统共用电源的串扰问题
  • ¥15 slam rangenet++配置
  • ¥15 有没有研究水声通信方面的帮我改俩matlab代码
  • ¥15 ubuntu子系统密码忘记
  • ¥15 保护模式-系统加载-段寄存器
  • ¥15 电脑桌面设定一个区域禁止鼠标操作
  • ¥15 求NPF226060磁芯的详细资料