Differences between webwork2.x and struts2 can be seen from the application of webwork2.2 to the transplantation of struts2

Source: Internet
Author: User

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 isRich Text Editor is replaced by lgpl.

4,The Date Picker component is also licensed by the lgplDate Picker component substitution, unfortunatelyThe Date Picker component does not support internationalization.

Feeling 3 is a pity, fck editor is still very useful.

2. porting. 1. Package name

Replace com. opensymphony. webwork with org. Apache. struts2.
Replace com. opensymphony. xwork with COM. opensymphony. xwork2.

2. Configuration File

Rename webwork. properties to struts. properties.
SetRename xwork. xml t to struts. xml.

Replace all webwork in struts. properties and Struts. XML with Struts

In web. XML, SetCom. opensymphony. webwork. Dispatcher. filterdispatcher is replaced by org. Apache. struts2.dispatcher. filterdispatcher

3. Converter

If the converter you are using inherits webworktypeconverter, rename the superclass as strutstypeconverter.

4. jsp files

You must add the tag URIUri = "/webwork" with uri = "/Struts-tags" 

After finishing and finishing work, you can basically test and release the product.

Of course, jdk5 is the best to use, and J4 support has not been tested.

 

In addition, it is found that struts2 supports the wildcard configuration in struts1. Compared with struts1, struts2 has changed a lot, thanks to the use of interceptor and the design of ognl for users, using struts2 can significantly increase productivity. We hope that webwork can be carried forward after being rebuilt by Apache.

 

Contact Us

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.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.