-1

I’m trying to understand how the Convention plugin determines when to do URL interpretation. In some REST Plug-in examples I see PrefixBasedActionMapper configured with ”/rest:rest,:struts” and it seems that Convention is only applied to the rest mapper and not the DefaultActionMapper. Is this correct? Either way, under what conditions does the Convention plugin kick in for requests?

I’ve been googling like a mad-man these last two days and can’t seem to find any explanation. Inspecting the plugin source didn't give any insights either.

Tyler Camp
  • 177
  • 15
  • Not sure what are you asking. If you have convention plugin in your classpath then it is working (if you haven't disabled it somehow). – Aleksandr M Oct 27 '17 at 17:59
  • What do you mean by Convention? You can mix the rest convention and convention plugin convention as well as defined by the example. – Roman C Oct 30 '17 at 23:03

1 Answers1

1

They are different. Convention Plugin is not about URL/action mapping. It just search java classes and create action configs from them.

However, you can tell the plugin to search specific root packages using the property struts.convention.action.packages. e.g.

<constant name="struts.convention.action.packages" value="com.mycompany.myactions.myconvention.*"/>
Yasser Zamani
  • 2,380
  • 21
  • 18