Http://kimsoftware.javaeye.com/admin/show/39354 (My javaeye blog)
The following text is from the official struts2 website. I. Changes
Struts2CodeStarted with webwork2.2.3. A few major changes may affect the porting of your webwork2.2 application.
1. SomeDeprecated methods and classes have been removed, includingXwork inversion of control (IOC) framework.
2. Some tool libraries using XHTML themes are replaced by dojo tool components.
3. Use fck editor'sThe Rich Text Editor component isRi
data conversion rules.
◆ Verification and error handling
In JSF, you can easily implement rules such as "a field cannot be blank" or "a field must be a number automatically. The customer also hopes to get a proper prompt after entering the error data. JSF provides a method to complete most similar tasks.
◆ Internationalization
JSF provides international publishing management to address topics such as character encoding and resource file selection.
◆ Custom components
◆ Selectable Renderer
By de
method in Java is to obtain the generic capability in this way, and there are other methods. However, the static method is special. To make the static method have the ability to reflect, you must use the above method.Hope to solve your problem.Please give me a detailed introduction to the benefits of using generics in JAVA. Can I create objects without using generics?
1. generics are very useful. If they can be used with reflection, the amount of code used by common enterprise applications can
On the official website of struts, the following two paragraphs are written:
Apache Struts 2 is a elegant, extensible framework for creating Enterprise-ready Java Web applications. The framework is designed to streamline the full development cycle, from building, to deploying, to maintaining Applicatio NS over time.
Apache Struts 2 was originally known as WebWork 2. After working independently for several years, the
STRUTS2 authoritative Guide to introduce, and combined with the author before this also used WebWork and struts1, but still more familiar with the webwork, fortunately, Struts2 is close to webwork, so the study cost is relatively low, struts2 the benefits do not say, Let's talk about differences.
1, relative Struts1, no Formbean, the form code does not need to u
:
Configuration File: Spring configuration file is WEB-INF/xxxx-servelet.xm by default, XXX is the servlet-name of org. springframework. Web. servlet. dispatcherservlet in Web. xml.
Action Distribution: Spring maps the URL defined in the configuration file to a specific controller class, and then calls the corresponding action method in the Controller Using Reflection based on the action = xxx or other parameters in the URL. Input data binding: Spring provides the binder to bind pojo through
I was preparing to build a small website some time ago, but I didn't want to use a large header like Spring/Struts/WebWork. So I decided to write an MVC Framework myself. It took about three days to complete and is currently running well. The entire MVC framework is only 21KB. If you are interested, you can download the source code and jarpackage from http://code.google.com/p/lightweightmvc/downloads/list.
Design goals:
The simplest and most compact M
?
Comparison content
Struts
Webwork2
Action class
In strutsAll action classes need to extend org. Apache. Struts. action. Action; this will lead to some problems in Java programming, that is, the issue of multiple inheritance.
Webwork only requires implement COM. opensymphony. xwork. action interface, you can also implement other interfaces to implement more functions
Struts 2 is an elegant, extensible framework for creating enterprise-ready Java web applications. the framework is designed to streamline the full development cycle, from building, to deploying, to maintaining applications over time. apache Struts 2 was originally known as WebWork 2. after working independently for several years, the WebWork and Struts communit Ies joined forces to create Struts2. This new
apparent.
The company began to choose a better MVC solution, such as JSF.
In this context, the struts2 framework was born. The struts2 framework development team is composed of two teams: struts1 and webwork, and webwork no longer releases new versions.
The Born struts2 framework combines the struts1 and webwork frameworks with the
transaction management abstraction that provides a consistent programming model for various underlying transaction management technologies, such as JTA or JDBC transactions. Spring provides an AOP framework written in the standard Java language, which provides pojos with declarative transaction management and other enterprise transactions-if you need to-implement your own aspects. This framework is powerful enough to allow applications to get rid of the complexity of ejbs and enjoy key services
(Except for some specific plots with specific time points of the story, this story is purely fictitious. If there are similarities, it is a coincidence .) If you are interested in this article, read the first two articles in this series: play with spring STRUTS + hibernate + spring add deletion and modification query examples and play with spring hibernate + webwork + spring add deletion and modification query examples, otherwise you will not understa
. Shale is a component-based framework and has recently become a top-level project for Apache. And Struts Ti is based on the successful experience of struts continue to adhere to the front-end controller (Front Controller) and MVC (Model-view-controller) mode to improve.
The WebWork project, released in March 2002, revolutionized the struts framework by introducing new ideas, concepts, and features, but not compatible with the original struts code.
By kxlzxSummary
This article introduces some security defects of the popular java development frameworks struts2 and webwork, and provides examples to illustrate the framework itself and the use of webwork.Various security problems arising from the framework, as well as some experiences from the author mining the framework security vulnerabilities.
Recommended for the following:
Java DevelopmentUnderstand framework developmentUnderstand web applicatio
I. Introduction to appfuse
Appfuse is a guiding entry-level J2EE framework developed by Matt raible. It demonstrates how to integrate popular basic frameworks such as spring, hibernate, ibatis, struts, xdcolet, and JUnit, the latest version 1.7 provides support for taperstry and JSF. At the persistent layer, appfuse uses the Hibernate O/R ing tool (http://www.hibernate.org); in terms of containers, it uses the Spring framework (http://www.springframework.org ). Users can freely choose struts, sp
Struts 2 is the next-generation product of struts. It is a new struts 2 framework that is combined Based on Struts and webwork technologies. The new architecture of struts 2 is significantly different from that of struts 1. Struts 2 uses webwork as the core and the interceptor mechanism to process users' requests. This design also enables the business logic controller to completely remove from the servlet A
to be a completely new framework, this is only relative to struts 1. Struts 2 does have a lot of revolutionary improvements compared to struts 1, but it's not a new framework for new releases, but rather a development based on another prestigious framework: WebWork. To some extent, Strut2 did not inherit the lineage of struts 1, but inherited the lineage of webwork. Alternatively,
. Client Invocation method Improved
For the client, the service object that the action relies on can only be found through the Findservice () method of the Servicelookup class, and does not need to care about the server IP address port on which the service resides.
The following is a sequential diagram of the modified client Lookup server-side call:
As pictured above, the main process for finding service-side webwork is as follows:
-validator.jar: a tool to help with verification. For example, verify the email string, date string, and so on.Coreapi. jar: a core class library of the application, which is the core package of Birt.Dataadapterapi. jar: the Data Processing Package of Birt.Dom4j-1.4.jar: is a Java xml api, similar to JDOM, used to read and write XML files. Hibernate uses dom4j to parse XML configuration files and XML ing meta files. Required.Dteapi. jar: the Data Processing Package of Birt. The specific function
implemented with two encode () methods of abstract interface Writer.
Public interface Writer {
Bitmatrix encode (String var1, Barcodeformat var2, int var3, int var4) throws n;
Bitmatrix encode (String var1, Barcodeformat var2, int var3, int var4, Map
The specific barcode Wirter class has different logic according to different types of barcode rules.
Users do not need to pay too much attention to the implementation of the internal, the need to produce what the appearance of th
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.