Common Use of Jar packages in SSH framework applications

Source: Internet
Author: User
Tags xml parser


Commons-logging-1.0.4.jar

You do not need to import Struts2 after it is added.

Log4j-1.2.15.jar

Hibernate does not need to be imported after it is added.

 

 

Jar file: The red is the correct jar package.

Operate the database jar

Mysql-connector-java-5.0.8-bin.jar

 

Struts2

The commons-logging-1.0.4.jarASF's log package, Struts2 framework uses this package to support Log4J's JDK1.4 logging.

Commons-logging.jar:

Log4j-1.2.15.jar

Freemarker-2.3.8.jar template-related operations require packages, Struts2 UI tag templates are written using FreeMarker.

Ognl-2.6.11.jar ognl: Object Graph Navigation Language, which writes the attributes of an Object through the struts2 framework.

The xwork-2.0.7.jar xwork core package, Struts2 built on it

Struts2-core-2.0.14.jar struts2 core package

Struts2-spring-plugin-2.0.14.jar struts2 integration spring required package

Commons-fileupload-1.2.1.jar: File Upload Component, which needs to be added after struts-2.1.6

Commons-io-1.3.2.jar: Upload the jar package on which the file depends

 

Hibernate jar package

Antlr-2.7.6.jar: A language conversion tool, Hibernate uses it to achieve HQL to SQL conversion template related operations need to package

Commons-collections-3.1.jar collections Apache tool class, Collection framework.

Javassist-3.9.0.GA.jar code generation tool, Hibernate uses it to extend Java class and implementation at runtime, the same as cglib package

Dom4j-1.6.1.jar dom4j xml Parser

Jta-1.1.jar standard Java transaction processing interface

Slf4j-api-1.5.8.jar and slf4j-log4j-2-1.5.0.jar hibernate use a logging system, which is an intermediate interface for slf4j to convert log4j.

Cglib. jar CGLIB bytecode parser

Asm. jar ASM bytecode library, required if "cglib" is used

Echcache. jar EHCache cache, use Cache

 

Spring

Spring-beans.jar: this jar file is used by all applications, including accessing the configuration file, creating and managing beans, and performing Inversion of Control/Dependency Injection (IoC/DI) all operation-related classes. If the application only requires basic IoC/DI support, introduce the spring-core.jar and spring-beans. jar files.

Spring-context.jar: this jar file provides a lot of extensions for the Spring core. You can find all the classes required to use the Spring ApplicationContext feature, all the classes required by JDNI, And the classes used to integrate the UI with the Templating engines such as Velocity, FreeMarker, and JasperReports, and Related Classes for Validation.

Spring-da0.jar: this jar file contains all the classes for Spring DAO, Spring Transaction for data access. To use declarative transaction support, you also need to include spring-aop.jar in your own applications.

Spring-orm.jar this jar file contains Spring to DAO feature set has been extended, make it support iBATIS, JDO, OJB, TopLink, because Hibernate has been an independent package, now not included in this package. Most of the classes in this jar file depend on the classes in the spring-dao.jar, You need to include the spring-dao.jar package at the same time when using this package.

Spring-hibernate.jar: this jar file contains all the classes Spring encapsulates for Hibernate2 and Hibernate3.

Spring-core.jar this jar file contains the basic Spring framework core tool class, other components of Spring to use the class in this package, is the basic core of other components, of course, you can also use these tool classes in your application system. Spring-jdbc.jar contains all the classes Spring encapsulates for JDBC database access

Spring-aop.jar: this jar package contains the classes required to use Spring's AOP features in applications. Use Spring features based on AOP, such as Declarative Transaction Management, to include the jar package in the application.

Spring-jdbc.jar

This file contains all classes encapsulated by Spring for JDBC data access.

Spring-remoting.jar: this jar file contains classes that support EJB, JMS, remote call Remoting (RMI, Hessian, Http Invoker, JAX-RPC.

Spring-support.jar
This jar file contains classes that support Cache (ehcache), JCA, JMX, Mail service (Java Mail, COS Mail), and Task Plan Scheduling (Timer, Quartz.

Spring-web.jar
This jar file contains the core classes required to use the Spring framework for Web application development, includes automatic loading of WebApplicationContext, Struts and JSF integration, file upload support, Filter, and a large number of tool-assisted classes.

Spring-webmvc.jar
This jar file contains all classes related to the Spring MVC framework. Includes FreeMarker, JasperReports, Tiles, Velocity, and XSLT related classes for internationalization, tags, Theme, and view display. Of course, if your application uses an independent MVC framework, you do not need any classes in the JAR file.

Spring-tx.jar provides support for things

Aspectjrt. jar and aspectjweaver. jar: Classes required for AOP support.

C3p0-0.9.1.2.jar: use this jar file when using the c3p0 database connection pool.

Cglig-nodep-2.1.3.jar: use this jar when using a dynamic proxy.

Common-annotations.jar: IOC support.

Spring. jar: A single jar package containing the complete release, spring. jar contains the contents of all other jar packages containing the content in the spring-mock.jar, because the spring-mock.jar is used for auxiliary testing only in the development environment, these classes are not allowed in formal application systems.

Except spring. jar file. Spring also includes 13 other independent jar packages, each containing the corresponding Spring components. You can choose to combine your own jar packages as needed, instead of introducing the entire spring. jar.

The package required by the log4j-1.2.15.jar operation log.

Spring-mock.jar
This jar file contains a complete set of mock classes from Spring to assist in application testing. The Spring Test Suite uses a large number of mock classes, making testing easier. It is convenient to simulate the HttpServletRequest and HttpServletResponse classes in Web application unit testing.

Commons-dbcp.jar: Data Source Commons-pool.jar Data Source
The selection of these release packages is actually quite simple. If you are building a Web application and using Spring throughout the process, it is best to use a single whole spring. jar file; if your application only uses a simple Inversion of Control/Dependency Injection (IoC/DI) container, you only need to spring-core.jar and spring-beans.jar; if you have high requirements for release size, you have to carefully select the jar file that contains the features you need. With an independent release package, you can avoid including all the classes that your application does not need. Of course, you can use other tools to make sure that the entire application package is smaller. The focus of space saving is to find out the Spring dependency classes you need accurately, then merge the required classes and packages. Eclispe has a plug-in named ClassPath Helper to help you find the dependent class.
Spring package dependency description:
1) spring-core.jar needs commons-collections.jar, spring-core.jar is the basic of the following other.
2) spring-beans.jar for spring-core.jar, cglib-nodep-2.1_3.jar
3) spring-aop.jar needs spring-core.jar, spring-beans.jar, cglib-nodep-2.1 _ 3.jar, aopalliance. jar
4) spring-context.jar needs spring-core.jar, spring-beans.jar, spring-aop. jar, commons-collections.jar, aopalliance. jar
5) spring-dao.jar needs spring-core.jar, spring-beans.jar, spring-aop.jar, spring-context. jar
6) spring-jdbc.jar spring-core.jar, spring-beans.jar, spring-dao.jar
7) spring-web.jar spring-core.jar, spring-beans.jar, spring-context.jar
Spring-webmvc.jar/spring-core.jar/spring-beans.jar/spring-context.jar
(9) spring-hibernate. jar need spring-core.jar, spring-beans.jar, spring-aop.jar, spring-dao. jar, spring-jdbc.jar, spring-orm.jar, spring-web.jar, spring-webmvc.jar
Spring-orm.jar, spring-core.jar, spring-beans.jar, spring-dao. jar, spring-aop.jar, spring-jdbc.jar, spring-web.jar
11) spring-remoting. jar need spring-core.jar, spring-beans.jar, spring-aop.jar, spring-dao. jar, spring-context.jar, spring-web.jar, spring-webmvc.jar
Spring-support.jar, spring-core.jar, spring-aop. jar, spring-beans.jar, spring-dao.jar, spring-context.jar
13) spring-mock.jar needs spring-core.jar, spring-beans.jar, spring-dao.jar, spring-context. jar, spring-jdbc.jar

 

 

Jstl

Jstl. jar: key class required to operate jstl

Standard. jar: jstl depends on the standard. jar package. Both packages exist at the same time.

 

Junit

Junit-4.8.2.jar: jar files required for unit testing.

 

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.