Easyjweb-0.7.0 release

Source: Internet
Author: User

The Easyjweb-0.7 has made some improvements on the version of the easyjweb-0.6:

Major functional changes include:

1. removed intercpetor, which is difficult to use in version 0.6, and added intercptor Before and After Action execution;

2. Added support for theme functions;

3. Added Interceptor-based permissions or security control interfaces;

4. Added errorhandler to unify the error handling logic in the management framework;

5. added the forbitrep mechanism to prevent users from submitting forms repeatedly;

6. Improved the hello application;

 

Usage:

1. interceptor is the actionintercptor interface that provides interception operations before and after the action is executed. It also provides the simplest implementation of the three interfaces, you can choose inheritance to implement the interceptor before, after, or both. In the hello application, we implement a timeinterceptor to control access requests within a certain time range;

2. Theme functions. You can implement the ithememanager interface and itheme interface as needed. The ithememanager interface is used to return an itheme object from the request according to a certain policy. The itheme object defines the map of the style returned to the view. We provide a class for simple topic switching through the properties file. You only need to save your different styles as the theme_themename.properties file in the properties file, you can use theme = themename in the request to obtain the style of the topic, and keep the style of the previous request when the parameter request is not modified. In the hello application, we also implemented a simple demonstration of this function.

3. Permission control is based on Interceptor. You only need to implement the icondition interface to determine a request. If you do not throw a securityexception, true is returned. Similarly, we implement a Class Based on properties files. You need to associate a URL style with an icondition object and save it to the Web-INF/url2conditionmap. properties file. In the hello instance, we implement a simple permission control interception.

4. Errors in applications managed by errorhandler in a unified manner; you only need to throw your errors in a timely manner, use a corresponding class that implements the ierrorhandler interface to handle the error. In ierrorhandler, a page object can be returned to synthesize incorrect views. We also implement an errorhandlermanager Class Based on the properties file. You can define the error type and corresponding error handling class in the Web-INF/errorhandlermap. properties file. In the hello instance, we also provide a simple error handling application.

5. forbitrep uses the forbitrepprocessor method to intelligently generate a hexadecimal ID based on the user's session ID and system time. You only need to add an input type = hide in your own form, the value = forbit field can solve the problem of repeated submission.

6. The current Hello application includes a simple example of the latest 4 functions. We have made the default settings for these four new features. You only need to simply add the least configuration file and implementation class to use these more suitable features.

 

For more usage of new features, see related articles. We also hope that you can discover and timely feedback error information when using the framework, your comments on the features of the new version, or submit your improved code, make the framework more complete and easy to use. Download Easyjf-jweb0.7.0

 

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.