Struts 2 development process and detailed configuration

1: Struts development steps:

1. Web project, introduce struts - jar package

2. web. The core function of struts is introduced into XML

Configure filter

3. Development action

4. Configure action

src/struts. xml

2: Detailed configuration

1. Import 8 jar files

commons-fileupload-1.2. 2. Jar [file upload related package]

commons-io-2.0. 1.jar

struts2-core-2.3. 4.1. Jar [Struts2 core function package]

xwork-core-2.3. 4.1. Jar [xwork core package]

ognl-3.0. 5. Jar 【 ognl expression function support table 】

commons-lang3-3.1. Jar [struts extension to java.lang package]

freemarker-2.3. 19. Jar [struts tag template library jar file]

javassist-3.11. 0.GA. Jar [struts processing of bytecode]

2.web. XML detailed configuration

3. Develop action (3 methods)

1: directly inherit actionsupport

2: inherit action interface

Three types: do not inherit any classes and do not implement any interfaces

4. Configure action: Src / struts xml

That's all for the Struts development process and detailed configuration in this article. I hope it will be helpful to you. Interested friends can refer to the simple MVC example of struts 1_ Power node Java college sorting, use of S: select tag in struts 2 of JSP development, etc. Welcome to read other related topics on this site. Thank you for your support for programming tips!

The content of this article comes from the network collection of netizens. It is used as a learning reference. The copyright belongs to the original author.
THE END
分享
二维码
< <上一篇
下一篇>>