If all action classes are listed in struts.xml

Should all action classes be listed in struts.xml? Can the struts2 structure know action classes if they are not specified in struts.xml?

Reference Information. I'm relatively new to the layout, and I was asked to clear some struts2 code. There are several classes that are not mentioned in struts2.xml, jsp or javascript (I did a string search). I was wondering if I could remove them.

EDIT: I am sure that these classes are not used by other Java classes / libraries. This is what interests me.

+3
source share
4 answers

To be used in their intended form as a web action, one of the following four possibilities must be true:

  • The class is specified in struts.xml
  • struts
  • , @Christina

, , struts.xml, , , , .

- *.xml . struts.xml XML , XML .

+4

, Struts2 XML . , Struts2 , struts, struts2, action actions, com.opensymphony.xwork2.Action , Action. , . . (http://struts.apache.org/2.1.6/docs/convention-plugin.html) , .

+3

, . .

0

- struts.xml, , . , struts.xml. , .

0

Source: https://habr.com/ru/post/1787618/


All Articles