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

橙三吉。 提交于 2019-12-13 20:06:19

问题


I do have a problem when I run my portlet application, I have this error :

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

I'm working with Struts 2.2.1 and 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>

回答1:


You have not specified the namespace annotation. How to properly map actions to namespaces look at the following documentation for convention plugin.



来源:https://stackoverflow.com/questions/16041504/error-jsr168dispatcher38-could-not-find-action-there-is-no-action-mapped-for

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!