How to declare a Generics Action in struts2.xml file?
问题 My problems is in a Struts2 action, where I have a class : public class MyAction<T> extends ActionSupport with a private member like this : private T myData; And I would like to declare this aciton in the struts.xml file, how can i manage to do so ? Thanks for the answer. Ps : I've tried without declaration of T, but it did not work 回答1: For example, you cannot obvioulsy write (in struts-XX.xml) <action name="doSomething" class="xx.xx.MyAction<java.util.Date>"> But you can easily code a class