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 如何在scanpy上做差异基因和通路富集?
  • ¥20 关于#硬件工程#的问题,请各位专家解答!
  • ¥15 关于#matlab#的问题:期望的系统闭环传递函数为G(s)=wn^2/s^2+2¢wn+wn^2阻尼系数¢=0.707,使系统具有较小的超调量
  • ¥15 FLUENT如何实现在堆积颗粒的上表面加载高斯热源
  • ¥30 截图中的mathematics程序转换成matlab
  • ¥15 动力学代码报错,维度不匹配
  • ¥15 Power query添加列问题
  • ¥50 Kubernetes&Fission&Eleasticsearch
  • ¥15 報錯:Person is not mapped,如何解決?
  • ¥15 c++头文件不能识别CDialog