struts-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Gena Ganebnyi <>
Subject action resolution seems to be not quite correct in Rest and Convention plugins
Date Wed, 10 Nov 2010 10:38:23 GMT
Hi All,

I have a struts2 project(2.2.1) configured to use both rest and conventions
plugin. Eevrything is configured according to guides, so nothing special
about configuration.
Till now everithings worked perfectly, but yesterday I came across strange

I had an action *xxx.actions.ApplicationController* that is a regular "rest"
controler. It is accesible via *localhost:8080/mywebapp/application* using
rest plugin syntax.
Since I need some things loaded via ajax I decided to add another action for
this. I placed it under *xxx.actions.ajax.AplicationTabsAction*. this is not
a "rest" action and simply replies on convention annotations.

public class ApplicationTabsAction extends ActionSupport {
 public String index() {
return SUCCESS;
public String summary() {
return SUCCESS;


In theory it should be accessible under *
But in reality an error ocurres;

	at org.apache.struts2.convention.ConventionUnknownHandler.handleUnknownActionMethod(
	at com.opensymphony.xwork2.DefaultUnknownHandlerManager.handleUnknownMethod(
	at com.opensymphony.xwork2.DefaultActionInvocation.invokeActionOnly(

Here is some debug output from struts:

2010-11-10 12:29:20,709 DEBUG - Creating an
DefaultActionProxy for namespace /ajax/application and action name
2010-11-10 12:29:20,710 DEBUG - intercept
'/ajax/application/summary' {
2010-11-10 12:29:20,711 DEBUG - applied
invocation context locale=ru_RU
2010-11-10 12:29:20,711 DEBUG - before Locale=ru_RU
2010-11-10 12:29:20,711 DEBUG - Setting params NONE
2010-11-10 12:29:20,712 DEBUG - Setting static
parameters {}
2010-11-10 12:29:20,713 DEBUG - Setting params
2010-11-10 12:29:20,713 DEBUG - Skipping
Interceptor... Method [index] found in exclude list.
2010-11-10 12:29:20,714 DEBUG -
Injecting navigation
2010-11-10 12:29:20,714 DEBUG - Executing action
method = summary

After some investigation I found out that *
http://localhost:8080/mywebapp/ajax/application* invokes index()
method of *xxx.actions.ApplicationController
*that is quite right because according to conventions plugin this action
should be mapped to *localhost:8080/mywebapp/application* only.

If I change @Action(value="/ajax/application/summary") to let
say @Action(value="/ajax/applicationtab/summary") everythng works just fine
under *http://localhost:8080/mywebapp/ajax/applicationtab/summary*
Any ideas why it happens so?

Regards, Genadii

  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message