static and dynamic Actionform
Actionform is one of the core classes of the struts framework, similar to an entity class, that collects and saves each data on the form. It is struts that resolves the struts-config.xml file to create the Actionmapping class, created from the Name property in the Actionmapping class.
Actionform is generally static, and if it is a st
Struts filter filters certain characters, struts filter filters
(1) Some specific characters may need to be filtered out when tianchao's rules are used for project purposes. The following is a simple case of character filtering;
(2) The filter code is as follows:
Package com. lc. filter; import java. io. IOException; import javax. servlet. filter; import javax. servlet. filterChain; import javax. servlet
Exception information:The struts dispatcher cannot be found. This is usually caused by using struts tags without the associatedFilter. Struts tags are only usable when the request has passed through its servlet filter, which initializes the struts dispatcher needed for this tag.
Problem description:When the struts2.0
In struts 1.0, we can only. specify a configuration file for actionservlet in XML, which is of course no problem for our online teaching examples. However, it may be troublesome in the actual application development process. Because many developers may need to modify the configuration file at the same time, but the configuration file can only be modified by one person at the same time, this will certainly cause resource competition to a certain extent
Sruts 2 workflow:
All actions in struts 1 have only one instance, which is used repeatedly. Through the red font section of the workflow of struts 2 above, we can clearly see that each action in struts 2 has multiple instances, meaning that an action instance is generated every time a request is processed, these instances are independent of each other and will
Struts internationalization, struts
Internationalization
1. Internationalization and Localization
Internationalization: I18N: when the program is not modified, it can be used in different countries or regions and different language environments, display characters according to the local language and format habits.Localization: L10N: when developing an international program, the process of creating language-
Recently in doing Java EE project, need to encapsulate a lot of tags, found directly from the Bodytagsupport inherited words, can't get valuestack, also can't borrow struts internationalization solution. So you need to extend the label of struts.
See a lot of online extension methods, feel can only be used as a reference or example, but it is not practical. Simpl
The Spring framework accomplishes the design tasks of the business layer, and the struts framework separates the presentation layer from the business layer, while the Hibernate framework provides flexible persistence layer support. The following is a description of the three framework integration environments:1, configuration Struts2.I, import the related jar package.II, modify the Web. xml file. The core control of STRUTS2 is an internship with a fil
when action after processing the class, in struts. XML Configure the file action . Configure action the purpose is to struts 2 know which action request to process. That is, to complete the user request and action .
in action You can specify result types , exception processor and interceptor, but only action name attributes must be specified, the attribute stone
---restore content starts---Write in front:Before starting to build this framework, for the Java framework: Struts+spring+mybatis completely without any concept, the application of eclipse is not a particularly familiar, but used before, the unfamiliar to eclipse also let me go a little detour. After nearly three weeks of groping or in a cattle man's guidance to complete, ashamed ah ... But in the end, I understood. At that time, I Baidu a variety of
Struts Development Kit download (including source files and various documents), struts Development Kit
(1) I have searched for Struts Development kits of various versions for a long time, which are basically incomplete or unusable at all;
(2) After a long time, I finally found the official website and shared it with you:
Http://struts.apache.org/download.cgi#s
In the previous blog, I talked about how actionservlet is initialized and the specific role of Web. xml configuration information. Today we will continue to explain how actionservlet reads/WEB-INF/struts-config.xml information to memory during initialization and how to present the information read from the configuration file in the form of actionmapping in memory.
Because this part of content is cumbersome, I cannot analyze it in detail, but I will e
Working mechanism:
Struts workflow:
When the web application starts, the initialization actionservlet will be loaded, and the actionservlet will
Read configuration information in the struts-config.xml file and store them to various configuration objects
When the actionservlet receives a customer request, it will execute the following process.
-(1) retrieve the actionmapping instance that matches the us
Before learning about struts, let's take a look at what the open-source Java framework of Struts is doing? If we use this frameworkProgramWhat benefits do developers get? Here is a brief introduction:
Http://j2ee.masslight.com/Chapter4.html#mvc
Struts is a framework that promotes the use ofModel-View-ControllerArchitecture for designing large scale applications
1.The Struts dispatcher cannot be found. This are usually caused by using Struts tags without the associated filter. Strut
2.S tags are only usable when the request has passed through its servlet filter, which initializes the Struts dispatcher n
3.eeded for this tag. -[Unknown Location]
Reason: If you want to in the JSP file, using the tag of
Reproduced from: http://blog.csdn.net/guoquanyou/article/details/6585847
The Struts dispatcher cannot be found. This are usually caused by using Struts tags without the associated filter. Struts tags are only usable when the request has passed through its servlet filter, which initializes the struts Dispatche R needed
before you learn Struts2, let's look at what is Struts2: Struts2 is a Web application framework based on the MVC design pattern, which essentially corresponds to a servlet, in the MVC design pattern, Struts2 as a controller to establish the data interaction between the model and the view. Struts 2 is the next generation of struts and is the new Struts 2 framework
This plug-in is used in struts applications.ProgramStart hibernate initialization, the original document hibernateplugin for struts, the steps are very simple:
1. Add in struts-config.xml:
Plug-in
Classname
= "Org. haree. Struts. hibernateplugin"
>
'Path-to-config-file' is relative to the root of
Detailed description of struts interceptor and struts interceptor1. Interceptor: The Struts2 interceptor intercepts a field before or after accessing an Action or Action. The Struts2 interceptor is pluggable and is an implementation of AOP.Explanation of WebWork Chinese document: the interceptor is the object for dynamically intercepting Action calls. It provides a mechanism for developers to define the cod
The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion;
products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the
content of the page makes you feel confusing, please write us an email, we will handle the problem
within 5 days after receiving your email.
If you find any instances of plagiarism from the community, please send an email to:
info-contact@alibabacloud.com
and provide relevant evidence. A staff member will contact you within 5 working days.