Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Could not find action or result

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 .

like image 777
Mohit Arora Avatar asked Jun 19 '15 07:06

Mohit Arora


1 Answers

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> 
   ...
like image 118
Roman C Avatar answered Oct 06 '22 21:10

Roman C