I've implemented REST into existing non-Restful Struts application and REST module work normally. The trouble is some button in the web page with struts-tags and other taglib make error
org.apache.struts2.components.ClosingUIBean | Could not open template java.lang.NullPointerException at org.apache.struts2.dispatcher.mapper.PrefixBasedActionMapper.getUriFromActionMapping(PrefixBasedActionMapper.java:117) at org.apache.struts2.components.FormButton.evaluateExtraParams(FormButton.java:83) at org.apache.struts2.components.Submit.evaluateExtraParams(Submit.java:86) at org.apache.struts2.components.UIBean.evaluateParams(UIBean.java:902) at org.apache.struts2.components.Submit.evaluateParams(Submit.java:82) at org.apache.struts2.components.ClosingUIBean.start(ClosingUIBean.java:55) at org.apache.struts2.views.jsp.ComponentTagSupport.doStartTag(ComponentTagSupport.java:53)
I have found the trouble, it because attribut action inside submit button
<s:submit value="Button" action="my-action-here"/>
I can replace attribut action with onClick like this
<input type="button" value="Button" onClick="someFunction()"/>
function someFunction(){
var params = 'line to add parameter'
window.location.href="<s:url action='my-action'/>"+params;
}
to execute the action, but there are 2504 page of jsp file and if i need to check all of them, it too much trouble. Is there any easier way to resolve it?