IT Certificaions

Google Cloud Platform

Thursday, September 20, 2012

Google App engine :Struts 2 : There is no Action mapped for namespace [/] and action name .


here is a code from my web.xml

<welcome-file-list>
    <welcome-file>index.jsp</welcome-file>
</welcome-file-list>

where index.jsp is redirected to a struts 2 action...

But when I access http://localhost:8888 I received the error below:


There is no Action mapped for namespace [/] and action name .

--------------------------------------------------------------------

Solution:   Please edit your struts.xml and enter this action as last action( only after all actions as a default action).


<action name="*">
           <result type="redirectAction">
             <param name="actionName">Home.action</param>
           </result>
</action>

Now this must be the last action and it will work like a default action for your application.