You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@struts.apache.org by nodje <no...@gmail.com> on 2009/09/28 09:00:06 UTC

2.0.14 to 2.1.6: There is no Action mapped for namespace / and action name . - [unknown location]

as many, I'm facing this damned error.
numerous post about this haven't been ale to solve my problem.

I have been trying to migrate from 2.0.14 to 2.1.x in the past, but hard to
revert to original version because of this.

The application still works if I specify the welcome-file manually in the
url.
That is to say http://localhost:8080/myapp used to work with 2.0.14 but not
anymore. 
But http://localhost:8080/myapp/index.jsp works with 2.1.6.

index.jsp is just <% response.sendRedirect("loginPageAction.action"); %>

web.xml contains:

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

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

struts.xml looks like that:

<package name="ssl-default" extends="struts-default">
<package name="default" extends="ssl-default">

Again, everything used to work fine with 2.0.14. It is just that the
welcome-file don't seem to be taken into account.

I've tried the Config browser app and it works fine, displays all the
actions linked. But it also fail if one omit to specify the jsp file name:
http://localhost:8080/myapp/config-browser/ fails while
http://localhost:8080/myapp/config-browser/index.action works.

please help!!!

-- 
View this message in context: http://www.nabble.com/2.0.14-to-2.1.6%3A-There-is-no-Action-mapped-for-namespace---and-action-name-.----unknown-location--tp25641418p25641418.html
Sent from the Struts - User mailing list archive at Nabble.com.


---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
For additional commands, e-mail: user-help@struts.apache.org


Re: 2.0.14 to 2.1.6: There is no Action mapped for namespace / and action name . - [unknown location]

Posted by nodje <no...@gmail.com>.
Solved: just have a look on
http://cwiki.apache.org/S2WIKI/troubleshooting-guide-migrating-from-struts-20x-to-21x.html

I wish I new such a file existed, it doesn't seem to be often refered to on
google. I stumble upon it while looking for somethig else.

It states:

Filter Mapping, default Action extensions, and Servlets
[...]

To fix this problem you can explicitly set the default action extension back
to just "action" or you can change your filter mapping for the struts
filter.

To set the action extension list back to just "action" add this to your
struts.xml file:

<constant name="struts.action.extension" value="action" />

If all your actions use the ".action" suffix then you may want to change the
Struts filter-mapping so that only actions are handled by the struts filter.
Also the FilterDispatcher has been deprecated and replaced by
StrutsPrepareAndExecuteFilter.

The web.xml before (matching all requests):
	 
<filter>
	<filter-name>struts2</filter-name>
	<filter-class>org.apache.struts2.dispatcher.FilterDispatcher</filter-class>
</filter>

<filter-mapping>
	<filter-name>struts2</filter-name>
	<url-pattern>/*</url-pattern>
</filter-mapping>

Change to use the new StrutsPrepareAndExecuteFilter and match just struts
requests.

The web.xml after:
	 
<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>*.action</url-pattern>
</filter-mapping>

<filter-mapping>
	<filter-name>struts2</filter-name>
	<url-pattern>/struts/*</url-pattern>
</filter-mapping>





nodje wrote:
> 
> as many, I'm facing this damned error.
> numerous post about this haven't been ale to solve my problem.
> 
> I have been trying to migrate from 2.0.14 to 2.1.x in the past, but hard
> to revert to original version because of this.
> 
> The application still works if I specify the welcome-file manually in the
> url.
> That is to say http://localhost:8080/myapp used to work with 2.0.14 but
> not anymore. 
> But http://localhost:8080/myapp/index.jsp works with 2.1.6.
> 
> index.jsp is just <% response.sendRedirect("loginPageAction.action"); %>
> 
> web.xml contains:
> 
> <filter>
>         <filter-name>struts2</filter-name>
>        
> <filter-class>org.apache.struts2.dispatcher.ng.filter.StrutsPrepareAndExecuteFilter</filter-class>
> </filter>
> 
> <welcome-file-list>
>         <welcome-file>/index.jsp</welcome-file>
>     </welcome-file-list>
> 
> struts.xml looks like that:
> 
> <package name="ssl-default" extends="struts-default">
> <package name="default" extends="ssl-default">
> 
> Again, everything used to work fine with 2.0.14. It is just that the
> welcome-file don't seem to be taken into account.
> 
> I've tried the Config browser app and it works fine, displays all the
> actions linked. But it also fail if one omit to specify the jsp file name:
> http://localhost:8080/myapp/config-browser/ fails while
> http://localhost:8080/myapp/config-browser/index.action works.
> 
> please help!!!
> 
> 

-- 
View this message in context: http://www.nabble.com/2.0.14-to-2.1.6%3A-There-is-no-Action-mapped-for-namespace---and-action-name-.----unknown-location--tp25641418p25642691.html
Sent from the Struts - User mailing list archive at Nabble.com.


---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
For additional commands, e-mail: user-help@struts.apache.org