【问题标题】:ERROR [Jsr168Dispatcher:38] Could not find action There is no Action mapped for action name default. - [unknown location]错误 [Jsr168Dispatcher:38] 找不到动作 没有为动作名称默认映射的动作。 - [未知位置]
【发布时间】:2013-04-16 15:49:57
【问题描述】:

我在运行我的 portlet 应用程序时确实遇到了问题,我有这个错误:

ERROR [Jsr168Dispatcher:38] Could not find action There is no Action mapped for action name default. - [unknown location] 

我正在使用 Struts 2.2.1 和 Liferay 6.0.6

<?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">

<struts>
<constant name="struts.devMode" value="false" />
    <package name="eleve" extends="struts-portlet-default">
        <action name="ajoutereleves">
            <result>/JSPs/eleve/addeleve.jsp</result>
        </action>
        <action name="AddEleveAction" class="com.version.projet.actions.AddEleveAction">
            <interceptor-ref name="jsonValidationWorkflowStack"/>
            <result name="input">/JSPs/eleve/addeleve.jsp</result>
            <result name="error">/JSPs/eleve/addeleve.jsp</result>
            <result>/JSPs/eleve/showseleves.jsp</result>
        </action>
    </package>
</struts>

【问题讨论】:

    标签: java configuration struts2 liferay portlet


    【解决方案1】:

    您尚未指定namespace 注释。如何正确地将操作映射到namespaces 请查看以下约定插件文档。

    【讨论】:

    • 感谢回复。问题依然存在。因为我的示例在没有 liferay 的情况下运行良好,但是当我将其配置为 struts2 portlet 时,我遇到了这个问题。
    猜你喜欢
    • 1970-01-01
    • 2013-11-01
    • 1970-01-01
    • 2015-04-29
    • 2014-01-10
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    相关资源
    最近更新 更多