1: Basic concepts of spring
1) Struts 2 is web framework, hibernate is orm framework
2) spring is a container framework, which creates beans and maintains the relationship between beans
3) Spring can manage the web layer, persistence layer, business layer, dao layer, spring can configure the components of each layer, and maintain the relati ...
Posted by werty37 on Tue, 09 Jun 2020 23:13:17 -0700
1. Execution process chart of struts 2
The whole implementation process is divided into two parts:
1. Server start - > initialization filter - > Load struts.xml
2. Browser send request - > filter - > struts.xml Find action class name in - > instantiate action class
The action class w ...
Posted by Ju-Pao on Fri, 05 Jun 2020 02:32:41 -0700
Simple construction of Struts (Introduction)
Process summary: (struts 2 download: https://struts.apache.org/)
(software requirements: install eclipse/myeclipse and tomcat)
Guide Package: (in apps, blank case is the simplest package needed)
Action class: (path: SRC > CN. Itcast. Hello (the package of the class) > class name)
Posted by petroz on Sun, 03 May 2020 05:07:15 -0700
Struts 2 provides the stream result type, which is specifically used to support the file download function. The following four properties are required to configure the result of stream type.
contentType: Specifies the file type of the downloaded file
inputName: Specifies the entry input stream of the downloaded file
Posted by greeneel on Fri, 01 May 2020 21:03:00 -0700
1. Results view of struts 2
Each atcion of Struts2 can have different result return methods. There are 11 ways to return the result type attribute in result. The main and most commonly used jump modes are redirect, redirectAction and pather.
The type of the specific jump method can be found in struts-default.xml, as follows:
<package name=" ...
Posted by budz on Sat, 18 Apr 2020 02:10:09 -0700
For Web applications, all request parameters are of string type. In traditional Web applications, we often need to manually code, convert the received parameters to various types of Java, or convert various types of Java parameters to strings and send them to the client. In the framework of struts 2, a powerful type con ...
Posted by IMP_TWI on Tue, 14 Apr 2020 12:14:17 -0700
This post mainly explains how Spring integrates with struts 2 framework
Key points of integration of struts 2 and Spring:
The action object is given to Spring to create
Entering the jar package
To import a jar file:
1) Introduce struts. Jar related files
2) Spring core related jar files
3) Spring web support jar ...
Posted by jarv on Fri, 03 Apr 2020 11:58:34 -0700
1, Struts 2 internationalization
1. Overview of struts 2 internationalization
2. Internationalization of struts 2
2, Struts2 data verification framework
1. Steps of Struts2 data verification framework
2. Using validate method to verify data
3. Provide corresponding verification m ...
Posted by sorenchr on Sun, 01 Mar 2020 02:25:45 -0800
I have a struts 2 operation on the server side for file download.
<action name="download" class="com.xxx.DownAction">
<result name="success" type="stream">
<param name="contentDisposition ...
Posted by Greaser9780 on Mon, 10 Feb 2020 03:04:08 -0800
After these days of learning, I have learned some basic knowledge about Struts. Here, I use Struts 2 to realize user registration and login, which helps us to better understand some working mechanisms of Struts.
First of all, import the necessary jar package of Struts2 and add configuration information in the web.xml configura ...
Posted by doobster on Fri, 31 Jan 2020 14:27:40 -0800