Vidhya.Kailash
Vidhya.Kailash

Reputation: 1

Struts2 submit tag not working in struts2.1.8 with method attribute

I am upgrading a struts2 app from struts version 2.1.6 to 2.1.8. I have the following submit tag with method attribute, which has stopped working since the upgrade.

<s:form action="xyzDetail_save" theme="simple">

<s:submit method="addxyz" value="%{getText('button.add1')}" />  

There are other struts libraries used like struts-dojo, struts-tiles. Does anybody have an idea why this wouldnt work? Or can you leave me clue about which interceptor should I debug to get to the bottom of the problem? Thanks

Upvotes: 0

Views: 1576

Answers (2)

Maurizio Cucchiara
Maurizio Cucchiara

Reputation: 895

You should take a look at org.apache.struts2.dispatcher.mapper.DefaultActionMapper, parseActionName method. As I told you before and as you will see, you have to set StrutsConstants.STRUTS_ENABLE_DYNAMIC_METHOD_INVOCATION to true.

Upvotes: 0

Maurizio Cucchiara
Maurizio Cucchiara

Reputation: 895

Try to set DMI to true in your struts.xml (notice that DMI is higly discouraged for security reasons)

<constant name="struts.enable.DynamicMethodInvocation" value="true" />

Upvotes: 1

Related Questions