ConfigurationException: Method send for action message is not allowed using Struts 2 and REST plugin

1.4k Views Asked by At

I am using Struts 2.5.14.1 and Struts REST plugin.

Everything seems to work fine except the custom methods.

The index(), show(), and other default methods work.

But when I give some different custom method, It doesn't seem to work and throws an error.

com.opensymphony.xwork2.config.ConfigurationException: Method send for action message is not allowed!
    at com.opensymphony.xwork2.DefaultActionProxy.prepare(DefaultActionProxy.java:203) ~[struts2-core-2.5.14.1.jar:2.5.14.1]
    at com.opensymphony.xwork2.DefaultActionProxyFactory.createActionProxy(DefaultActionProxyFactory.java:76) ~[struts2-core-2.5.14.1.jar:2.5.14.1]
    at org.apache.struts2.rest.RestActionProxyFactory.createActionProxy(RestActionProxyFactory.java:50) ~[struts2-rest-plugin-2.5.14.1.jar:2.5.14.1]
    at org.apache.struts2.dispatcher.Dispatcher.serviceAction(Dispatcher.java:564) [struts2-core-2.5.14.1.jar:2.5.14.1]
1

There are 1 best solutions below

0
Roman C On

REST plugin uses mapping HTTP methods to java methods by convention.

Other methods could be mapped in not strict mode of rest action mapper.

If you want to learn more about it you should read this answer.