A detailed explanation of some common packages in struts

Source: Internet
Author: User

Commons-beanutils.jar
Commons-beanutils This is a subproject in the Jakartacommons project. The goal of this project is to help developers dynamically acquire/Set value JavaBean properties while addressing the trouble of writing getxxx and setxxx every time. The
Commons-digester.jar
Digester is simply a tool in jakartastruts that handles Struts-config.xml configuration files. Obviously, converting an XML file to a corresponding Java object is a common feature that is supposed to have a wider range of uses, so it soon has a place in the Jakartacommons project, which provides a reusable Java component library.

resolves the Struts configuration file internally, struts  using the digester from the Jakarta commons[asf, commons] project. digester  uses STRUTS-CONFIGDTD to verify the format of the document and to create the Java objects that the document describes. If the XML file contains an informally documented element, or if the element is used informally, digester will not process the file.   

Commons-fileupload.jar
Commons-fileuploadfileupload makes it possible to upload files in struts with powerful and high-performance file upload capabilities that you can easily add to your application and servlet.
The validation framework for struts relies on the following two packages:

Commons-validator.jar
(calibration method) and validation rules. Supports the internationalization of validation rules and error messages.  struts uses it to validate the form.

Jakarta-oro.jar
Commons-el commons-jexl search jakarta orojakartaoro A set of text processing tools, can provide perl5.0-compatible regular expressions, awk-like regular expressions, glob expressions. also provides replacement, segmentation, file name filtering and other functions.

Struts.jar
Struts Core Package。

Other jar packages
Commons-collections.jar
Extend the standard javacollection framework, providing additional map, list and set implementations, and a number of useful tool class libraries. function is stronger than java.util.*.
Commons-logging.jar:
One of the apachecommons packages that contains the logging functionality. The package itself contains a simplelogger, but the function is weak. In the run it will first find log4j in Classpath, if there is, the use of log4j, if not, to find JDK1.4 belt java.util.logging, if you can not find the use of Simplelogger. The emergence of Commons-logging.jar is a historical legacy of regret, when Apache lobbied Sun log4j to join JDK1.4, but JDK1.4 project team has been close to the release of JDK1.4 product time, so rejected the Apache request, use their own Java Util.logging, the function of this package is far worse than log4j, and the performance is general.
Apache later developed the Commons-logging.jar to be compatible with two logger. Therefore, the log program written with Commons-logging.jar, the bottom of the logger can be switched, you can choose log4j,java.util.logging or its own simplelogger. However, I still strongly recommend using LOG4J, because log4j performance is very high, log output information time is almost equal to System.out, and processing a log on average only need 5us. You can find in the Hibernate src directory hibernate has been prepared for you log4j configuration files, you only need to go to the Apache website to download log4j on it. Commons-logging.jar is also a necessary 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.