Could not find action or result

Mohit Arora picture Mohit Arora · Jun 19, 2015 · Viewed 11.2k times · Source

I am getting:

com.opensymphony.xwork2.util.logging.commons.CommonsLogger warn Could not find action or result There is no Action mapped for namespace [/] and action name [] associated with context path [/]. - [unknown location]

I am using a combination of RAD + WebSphere for development with the following code:

struts.xml:

<struts>
    <constant name="struts.devMode" value="true" />
    <constant name="struts.custom.i18n.resources" value="ApplicationResources" />
    <package name="default" extends="struts-default" namespace="/">

web.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>

I have read all blogs & tried everything mentioned on sites. It is an error because of some different reason what I am unable to find .

Answer

Roman C picture Roman C · Jun 19, 2015

There's no configuration for action name [] and namespace [/]. This is a problem. To solve this you should add a configuration. Supposed you have an index.jsp file in the root folder. Using a actionless result you can redirect to this page.

<package name="default" extends="struts-default" namespace="/">
   <action name=""><result>/index.jsp</result></action> 
   ...