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.




Comments

  1. Add the below blank action to you struts.xml file in "/" package namespace and it will show the index.html when you will only try to access your url (like appid.app.com) and it will not show the error. Normally it will add a blank action and app engine will redirect the blank action to your welcome file.


    index.jsp

    ReplyDelete
    Replies
    1. codes are getting removed here. let explan further. just add blank action by providing blank "" as your action name and redirect your result to index.php which will solve your problem

      Delete
  2. Add the below blank action to you struts.xml file in "/" package namespace and it will show the index.html when you will only try to access your url (like appid.app.com) and it will not show the error. Normally it will add a blank action and app engine will redirect the blank action to your welcome file.


    index.jsp

    ReplyDelete

Post a Comment

Popular posts from this blog

Read Images from a xlsx file using Apache POI

Read Excel using Apache POI - Exception in thread "main" org.apache.poi.poifs.filesystem.OfficeXmlFileException:

Struts 2 : Warning :No configuration found for the specified action: 'Login.action' in namespace: '/'