Details about some common struts packages

Source: Internet
Author: User

Commons-beanutils.jar
Commons-Beanutils is a subproject in the jakartacommons project. The purpose of this project is to help developers dynamically obtain/set the properties of the value JavaBean, and solve the trouble of writing getXXX and setXXX every time.
Commons-digester.jar
Digester was originally a tool in JakartaStruts to process struts-config.xml profiles. Obviously, converting an XML file into a corresponding Java object is a very common function, and this tool should be more widely used, so soon it had a place in the JakartaCommons Project (used to provide reusable Java component libraries.

Internally, Struts uses the Digester from the Jakarta Commons [ASF, Commons] project to parse the Struts configuration file. Digester uses struts-configDTD to verify the document format and create the Java object described in the document. Digester will not process an XML file that contains informal document elements or uses elements in informal document mode.

Commons-fileupload.jar
Commons-FileUploadFileUpload makes it easy for you to add powerful and High-Performance File Upload capabilities to applications and servlets. struts is used to upload files.
The struts verification framework depends on the following two packages:

Commons-validator.jar
(Verification method) and verification rules. Supports rule validation and internationalization of error messages. Struts uses it to verify the form.

Jakarta-oro.jar
Commons-EL Commons-Jexl Search Jakarta OROJakartaORO is a set of text processing tools that provide perl5.0 Compatible Regular Expressions, AWK-like regular expressions, and glob expressions. It also provides functions such as replacement, splitting, and file name consideration.

Struts. jar
Struts core package.

Other jar packages
Commons-collections.jar
Extends the standard JavaCollection framework and provides additional Map, List, and Set implementations as well as multiple useful tool libraries. More powerful than java. util.
Commons-logging.jar:
One of the ApacheCommons packages contains the log function. The package itself contains a SimpleLogger, but has poor functionality. At runtime, it will first find log4j in CLASSPATH. If yes, it will use log4j. If not, find the java. util. logging. If it cannot be found, use SimpleLogger. The emergence of commons-logging.jar is a legacy regret, the original Apache strongly urged Sun to add log4j to JDK1.4, but the JDK1.4 project team is close to the release of JDK1.4 product time, therefore, Apache's requirements are rejected and java is used. util. logging: This package has far worse functions than log4j and has average performance.
Later Apache developed a commons-logging.jar to be compatible with two logger. Therefore, the underlying Logger can be switched with the log program written in the commons-logging.jar. You can choose log4j, java. util. logging or its built-in SimpleLogger. However, I strongly recommend that you use log4j because log4j has high performance and the log output time is almost the same as System. out. On average, you only need 5 us to process a log. You can find the log4j configuration file that Hibernate has prepared for you in the src directory of Hibernate. You only need to download log4j on the Apache website. The commons-logging.jar is also a required jar package.

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.