All my attempts to get a working example of both, pure restful configuration together with at least one non-restful URL failed.
I have this page as a guide: https://cwik
I am also had the same error, i fix it by adding
<package name="api" namespace="/api" extends="rest-default">
<action name="users/*" class="com.aurum.struts.rest.UserController">
<param name="id">{1}</param>
</action>
</package>
complete example for REST and Non-REST action together is here https://github.com/sivailango/struts2-rest-nonrest
Prefix based action mapper delegates finding mapping to the corresponding mapper defined by the
<constant name="struts.mapper.prefixMapping" value="/rest:rest,:struts"/>
This means all URLs that have /rest
in the URL before the last slash /
are mapped to the rest mapper, others to the default mapper. If you have a receipt
controller, then you should use the value "/receipt:rest,:struts"
.
References: