Yes, you are right we do not declare actions in struts.xml and just use the Convention.
I tried to put it in the package-info.java. It worked as long as I did not add an additional method to a certain action, i.e. SpecifyMailTask. If I add here the annotation to allow the methods "changeLanguage", "deleteAttachment“, "uploadMailAttachment“ additionally, the other methods, which are allowed via the package-info.java, are not allowed anymore. Is this a wanted behavior? I will register a ticket, thank you for your quick response. Regards, Britta Katzenbach > Am 25.01.2018 um 12:02 schrieb Lukasz Lenart <lukaszlen...@apache.org>: > > 2018-01-25 10:50 GMT+01:00 Britta Katzenbach <katzenb...@liwa.de > <mailto:katzenb...@liwa.de>>: >> struts.xml: >> >> <package name="default" extends="tiles-default" namespace="/„ > >> … >> <global-allowed-methods>abort,execute,search,reset,download,refresh,delegate,forward,release,saveComments</global-allowed-methods> >> </package> > > I assume you do not declare actions in struts.xml, you just use the > Convention, right? > >> Java: >> >> @AllowedMethods(value = {"changeLanguage", "deleteAttachment", >> "uploadMailAttachment"}) >> public class SpecifyMailTask extends AbstractTask { >> >> @AllowedMethods(value = {"saveInputAndSuccess"}) >> public abstract class AbstractTask extends AbstractBasicJbpmTask implements >> ModelDriven<TaskModel>, Preparable {…} >> >> @AllowedMethods(value = { "abort", "cancel", "claim", "claimAndStart", >> "claimAndSkip", "complete", "delegate", "forward", >> "incomplete", "release", "skipAndComplete", "start", "suspend", >> "uploadTaskAttachment"}) >> public abstract class AbstractBasicJbpmTask extends AbstractCrmAction >> implements ModelDriven<TaskModel>, Preparable {…} > > You can put these annotations in package-info.java as well > >> This it would look like, if we could use inheritance. In others cases we >> have one or more layer of inheritance more. > > This is a limitation of our AnnotationUtils class but we can extend > it, please register a ticket in JIRA > https://issues.apache.org/jira/projects/WW/issues > <https://issues.apache.org/jira/projects/WW/issues> > > > Regards > -- > Łukasz > + 48 606 323 122 http://www.lenart.org.pl/ <http://www.lenart.org.pl/> > > --------------------------------------------------------------------- > To unsubscribe, e-mail: user-unsubscr...@struts.apache.org > <mailto:user-unsubscr...@struts.apache.org> > For additional commands, e-mail: user-h...@struts.apache.org > <mailto:user-h...@struts.apache.org>
smime.p7s
Description: S/MIME cryptographic signature