0

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]
Roman C
  • 49,761
  • 33
  • 66
  • 176
Anand Raja
  • 121
  • 5

1 Answers1

0

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.

Roman C
  • 49,761
  • 33
  • 66
  • 176