Struts2 18 Interceptor (8)

Source: Internet
Author: User

DebuggingInterceptor: the interceptor processes the seventh position of defaultStack. It can be called for debugging. I personally think that although the interceptor contains the most code, it is the most useless Interceptor. This interceptor mainly provides several debugging screens, because if we want to view the data stored in ActionContext or ValueStack, struts2 also provides a <s: debug> label. You only need to add this label to the page, and the data stored in ActionContext or ValueStack is clear, and no parameters need to be passed, so here is a brief introduction. The interceptor provides four debug screens: 1.XML. This method outputs the data in parameters (parameter), context, session, and value stack to the browser in the form of an XML file. console this method will pop up an OGNL debugging console in the browser to test the data in the value stack in the form of OGNL expressions 3. command is used to test the OGNL expression and return a string. to use the browser to list the attributes and attribute values of a specified object, struts2 must process the development mode, that is, set <constant name = "struts. devMode "value =" true "/>, of course, you can use the properties file, and then set the debug mode in the request parameters, the request parameters corresponding to the above four methods are: http: // host: port/path? Debug = xml, http: // host: port/path? Debug = console, http: // host: port/path? Debug = command, http: // host: port/path? Debug = browser is to pass a debug parameter to specify which debugging method to use.

Related Article

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.