Here based on struts 2 interceptor to achieve.
Use struts 2 interceptor to intercept all or specified requests, acquire and store the information such as operation user, operation time, operation location, operation result and operation time in the process of user operation, so as to facilitate the query and display of data in the future.
Added by agge on Mon, 23 Mar 2020 17:56:45 +0200
Upload a single file
<s:form action="HandlerAction" method="POST" enctype="multipart/form-data">
<s:file name="profile" label="Head portrait" />
<%-- <s:file name="profile" label="Head portrait" accept="image/jpeg" size="102400" /> --%>
<s:submit value="Submit" />
Added by Bramme on Fri, 27 Dec 2019 04:44:36 +0200
Struts upload picture
Today, I have finished the image upload and page display of the last blog.
File upload scheme:
Upload to tomcat server
Upload to the specified file directory, add the mapping relationship between the server and the real directory, so as to decouple the relationship between the u ...
Added by zxsalmanxz on Wed, 30 Oct 2019 17:37:21 +0200
<%@ page contentType="text/html; charset=GBK" language="java" errorPage="" %>
<%@taglib prefix="s" uri="/struts-tags"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
<html x ...
Added by Maugrim_The_Reaper on Thu, 03 Oct 2019 17:24:57 +0300
Foreword: The meaning of Annotation in Chinese.
Java annotations are used to provide metadata for Java code.
Metadata refers to the data used to describe data, which, in general, describes the relationship between codes or the internal relationship between codes and other resources (such as database tables). In some technical frameworks, such ...
Added by jamkelvl on Wed, 24 Jul 2019 06:00:22 +0300
Build a Struts2 web project step by step from scratch.
First, create a dynamic Web project with the following structure:
Then we add the jar packages needed for some projects, put them under the lib directory under WEB-INF, and add them to the project:
jar package download address: http://download. ...
Added by CodeBuddy on Sat, 13 Jul 2019 19:53:14 +0300
Several Development Modes for Action
1. Write a class that inherits ActionSupport and can use some of its functions
2. Write a class to implement the Action interface, override the execute method, and do not use the method defined in ActionSupport
3. Neither inherits nor implements. Write a method directly in this class to handle our ...
Added by dirkdetken on Tue, 09 Jul 2019 20:14:46 +0300
1.An error occurred when Struts2 used the dynamic method Universal Functional Test (Version 2.5).I thought I made a mistake, but I went back and checked for it, and then I used the (version 2.3) test.No errors were found in version 2.3.After the official website query, default.properties default configuration in version 2.5, as shown in the fig ...
Added by Mr_jmm on Sat, 29 Jun 2019 21:46:20 +0300
Article Summary1. How to create a Struts 2 Web application2. Configure struts 2 jar3. Add Struts 2 Servlet Filter4. Configure struts.xml, configure URL s, java classes, etc.5. Build and run
English Literature Please click here~
Struts 2 requires Servlet API version 2.4 or higher, JSP 2.0 or higher, and Java 7 or higher.
2. Cre ...
Added by hiprakhar on Wed, 12 Jun 2019 20:39:06 +0300
Comparing this with JSP's data transmission mode, you will find that... can really write two fewer sentences of code!!!Two commonly used data transfer methods in struts 2 are as follows:Attribute MatchingModelDriven interface matching (often used for custom types)Individuals prefer to use the first one. Why? Because _________________Next, pleas ...
Added by bwcc on Mon, 10 Jun 2019 00:17:31 +0300