找不到操作或结果

Moh*_*ora 6 java configuration struts2 struts-action action-mapping

我正进入(状态:

com.opensymphony.xwork2.util.logging.commons.CommonsLogger 警告 找不到操作或结果 与上下文路径 [/] 关联的命名空间 [/] 和操作名称 [] 没有映射的操作。- [未知地点]

我使用 RAD + WebSphere 的组合进行开发,代码如下:

struts.xml:

<struts>
    <constant name="struts.devMode" value="true" />
    <constant name="struts.custom.i18n.resources" value="ApplicationResources" />
    <package name="default" extends="struts-default" namespace="/">
Run Code Online (Sandbox Code Playgroud)

网页.xml:

<filter>
    <filter-name>struts2</filter-name>
    <filter-class> 
        org.apache.struts2.dispatcher.ng.filter.StrutsPrepareAndExecuteFilter 
    </filter-class>
</filter>
<filter-mapping>
    <filter-name>struts2</filter-name>
    <url-pattern>/*</url-pattern>
</filter-mapping>
<welcome-file-list>
    <welcome-file>Login.jsp</welcome-file>
</welcome-file-list>
Run Code Online (Sandbox Code Playgroud)

我已阅读所有博客并尝试了网站上提到的所有内容。由于某些不同的原因,我无法找到这是一个错误。

Rom*_*n C 5

没有操作名称[]和命名空间的配置[/]。这是个问题。要解决这个问题,您应该添加一个配置。假设您的index.jsp根文件夹中有一个文件。使用无操作结果,您可以重定向到此页面。

<package name="default" extends="struts-default" namespace="/">
   <action name=""><result>/index.jsp</result></action> 
   ...
Run Code Online (Sandbox Code Playgroud)