Java – should it be in struts All operation classes are listed in XML
Whether it should be in struts List all operation classes in XML? If the action classes are not listed in the struts 2 framework, can the struts 2 framework know them?
Background: I'm new to struts and have been asked to clean up some struts 2 code struts2. There are no classes referenced in the XML, any JSP or JavaScript (I did a string search) I wonder if I can delete these
Editor: I'm pretty sure these classes are not used by other Java classes / libraries This is the struts part I want to know
Solution
In order to be used as a web action in its intended form, one of the following four possibilities must be met:
>This class is listed in struts XML > this class is annotated with struts annotations > this class is inherited by another action class > your project is using the contract plug-in mentioned by @ Christina
If the class you are looking at is not in struts XML, no comments, no references anywhere else in the project, and the project does not contain contract plug-ins, then you should be happy
The only other problem is finding other * XML file struts. XML can contain other XML files, so the actual operation configuration of this class may be located in different XML files