Struts2 learning: Debug of overview

Source: Internet
Author: User

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.

 

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.