0
votes

I am new to Struts2, I have been facing an action mapping issue in my Application. The error message says

Struts has detected an unhandled exception:

Messages: There is no Action mapped for namespace / and action name "yourActionName". Stacktraces

There is no Action mapped for namespace / and action name "yourActionName". - [unknown location] com.opensymphony.xwork2.DefaultActionProxy.prepare(DefaultActionProxy.java:178) org.apache.struts2.impl.StrutsActionProxy.prepare(StrutsActionProxy.java:61) ...

The issue is intermittent and it occurs like very rarely. I have verified the action mapping in struts config file and also in JSP action seems to be correctly mapped. As far as I have understood, sometimes the action tries to map to wrong namespace. I have defined the namespaces in all the concerned JSP. Nothing seems to be wrong with the controller layer.

Please help me with this issue

1

1 Answers

0
votes

The same problem came into my application you should change your filter name

 <filter-class>
 org.apache.struts2.dispatcher.ng.filter.StrutsPrepareAndExecuteFilter
 </filter-class>

and after that you should clean your project then run it again if you get error then change the filter by this

 <filter-class>
     org.apache.struts2.dispatcher.FilterDispatcher
  </filter-class>

Do same process that is mentioned above it will work correctly because dispatcher.FilterDispatcher is deprecated after struts2.3.