Anand Raja
Anand Raja

Reputation: 111

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

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]

Upvotes: -1

Views: 1609

Answers (1)

Roman C
Roman C

Reputation: 1

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.

Upvotes: 0

Related Questions