After reading this part of the nutshell, I slipped the remaining parts of the overview. The main topics are Ajax, dependency injection, profiling, and debug, in addition to profiling, the sections about profiling are dizzy. The other sections can barely help to understand whether profiling is the AOP mentioned in spring, because IOC (dependency injection) in spirng is also mentioned earlier ). The only thing that I think is interesting in these sections is the debug section. Ajax is just a rough introduction. In struts2, two popular Ajax frameworks are integrated: dojo and DWR.
The "activation" of the debug function is very simple, as long as it is in struts. add struts in the properties file. if devmode is set to true, it is OK. Note that struts. the properties file seems to be case-sensitive and I am misled by this official document.Devmode = trueI couldn't see the expected results, and finally found a copy.The sample file of Struts. properties is case sensitive.
After the debug function is enabled, we only need to add? DEBUG = xml shows the content of an XML file in the browser. This XML file contains a lot of important data information. below is the content of the XML file displayed in my test case:
The above XML file contains paremetres, session, request, and value stack information. In the above example, I directly add? DEBUG = xml. All paremetres have no information. If I add? The output of DEBUG = xml and parametre is as follows:
The detailed information of the action class tutorial. customerinserter is also output in value-stack, as shown in:
Lists the attributes of aciton and their details. If you can know the details of this action, I think it will be helpful for our debug. Except? Besides DEBUG = xml, is there? DEBUG = console. I have not observed its display effect. Some people say it will display a pop-up ognl console, allowing users to test the ognl EXPRESSION IN THE VALUE stack, XML data is inserted from the XML mode to the top of the page.