The difference between struts 2.3 configuration and struts 2.0


1. Import different

struts of core jar 2.3 A total of 9 core jar packages need to be imported
commons-fileupload-1.2.2.jar: file upload component, this file must be added after version 2.1.6

commons-io-2.0.1.jar: Contains the io implementation class

commons-lang-2.5.jar: Contains the Filter implementation class

commons-logging-1.1.1.jar: log package, the Struts 2 framework uses this log package to support Log4J and JDK 1.4+ logging.

javassist-3.11.0.GA.jar: jar for operating bytecode

ognl-3.0.4.jar: Object Graph Navigation Language (Object Graph Navigation Language), through which the struts2 framework reads and writes the properties of objects

struts2-core-2.3. 1.2.jar: The core class library of the Struts 2 framework, such as the label library

xwork-core-2.3.1.2.jar: The XWork class library on which Struts 2 builds

freemarker-2.3.18.jar: The template for the UI labels of Struts 2

struts2.0 only needs to import 5 core jar packages

commons-logging-1.0.4.jar ognl

-2.6.11.jar

struts2-core-2.0.11.2.jar

xwork-core-2.0.5.jar

freemarker-2.3.8 .jar

2. The difference between filters in web.xml

struts 2.3:

<filter>
  <filter-name>struts</filter-name>
  <filter-class>org.apache.struts2.dispatcher.ng.filter.StrutsPrepareAndExecuteFilter</filter-class>
</filter>

struts 2.0:

<filter>
  <filter-name>struts</filter-name>
  <filter-class>org.apache.struts2.dispatcher.FilterDispatcher</filter-class>
 </filter>

Guess you like

Origin http://10.200.1.11:23101/article/api/json?id=327070448&siteId=291194637