Struts 2 Framework (8) - - Input Check of Struts 2
Input Check of Struts 2
In the actual development of our project, there are two kinds of data validation: front-end validation and server validation.
Client-side verification: js script is written mainly through jsp. Its advantage is obvious. It reminds the server in time if the input error is wrong, which can lighten the burden of the server. ...
Posted by zz50 on Thu, 18 Apr 2019 02:15:33 -0700
Struts 2 web Element Access and Template Inclusion and Default Action Use
The last article introduced how to use Action for parameter reception and simple form validation. This article introduces three ways of accessing web elements (request, session, application), template inclusion and default action.
Let me first look at how Action accesses web elements: 1. Map-based data transfer: IOC (control inversion); 2. Map- ...
Posted by dicamille on Fri, 12 Apr 2019 11:54:32 -0700
Struts 2 Summary - Interceptor Implementation Principle and Source Analysis (6)
Interceptor is one of the strongest features of Struts 2, or the core of Struts 2. Interceptor allows you to do some processing before or after the action and result are executed. At the same time, interceptors also allow you to modularize common code as reusable classes. Many of the features in Struts 2 are accomplished by interceptors. Interc ...
Posted by sajidfiaz on Wed, 10 Apr 2019 18:30:31 -0700
The third day of Struts 2 study - saving login information and data validation
In JSP, the scope of server-side data storage is usually request, session and application, and their corresponding Servlet API s are HttpServlet Rquerst, HttpSession and ServletContext, respectively. These scopes also need to be accessed in the controller of Struts2.
Struts2 provides an ActionContext class, which is called the Action Context or ...
Posted by ElizaLeahy on Tue, 09 Apr 2019 13:24:31 -0700
Day 28 (Employment Class) Customized mvc framework, Struts introduction and implementation process, environment construction
1.
Custom mvc framework
Write a mystruts framework
Mvc mode: Model Model View tries to Control the controller
Control, ControllerServlet acts as a controller!Getting request data encapsulation [BeanUtils can be optimized, (call method? ]Call Service to process business logic.Skip (Forwarding/Redirecting) [Skip Code Write Death]
Summary of ...
Posted by hyperyoga on Sun, 31 Mar 2019 05:15:29 -0700
Struts 2 wildcard details
For example, there are multiple requests in index.jsp
<a href="<%=path %>/usersAction!add.action">add</a><br>
<a href="<%=path %>/usersAction!show.action">show</a><br>
<a href="<%=path %>/usersAction!update.action">update</a><br>
<a href="<%=path %> ...
Posted by HairBomb on Fri, 29 Mar 2019 17:54:29 -0700
Struts 2 Learning Notes of J2EE Series (8) -- struts.xml Modular Configuration
Let's first look at the configuration file of the project in the previous blog:
There are two packages in this file, or two modules. When a project is relatively large, there may be dozens or even hundreds of modules in it. If they all write struts.xml files like this, then struts.xml will inevitably be very confused. Struts 2 provides a mod ...
Posted by bennyboywonder on Thu, 14 Feb 2019 17:00:18 -0800
js drag picture / input upload + form submission + ajax upload to struts
Effect demonstration:
1. html section
<div class="input_part" type="text">
<div class="icon_search"></div>
<input type="text" name="input_text" id="input_text">
<button id="search_btn">search</button>
<div class="openImg"></div>
</div>
<div class="image_part js_hid ...
Posted by huntrguy102 on Mon, 11 Feb 2019 14:57:18 -0800
java.lang.NoSuchFieldException: resourceEntries struts2
1. About using struts2 to report java.lang.NoSuchFieldException: resourceEntries in the project.
When we use Tomcat version 7.0.64 and below, there will be no problem. When we use tomcat 7.0.65, we will report this question. Many of the answers we see online are about tomcat 8 and so on.
The actual problems began at tomcat 7.0.65. The root ...
Posted by blues on Tue, 22 Jan 2019 09:42:12 -0800
J2EE Series Spring 4 Learning Notes (XIII) -- Spring 4 Integrates Struts 2 and Hibernate 4
Now use Spring 4 to integrate Struts 2 and Hibernate 4.
Struts 2.3.16, Spring 4.0.6, Hibernate 4.3.5 integrate the required jar packages:
The jar package required for Struts 2.3.6:
Spring 4.0.6 requires jar packages:
The jar package required for Hibernate 4.3.5:
The MySQL database is installed locally, and MySQL driver package is add ...
Posted by fleabel on Sat, 15 Dec 2018 16:42:03 -0800