An example of an MVC pattern in a Java Web application

Source: Internet
Author: User

1. Availability

Using Simplemappingexceptionresolver to implement exception handling

You only need to add the following in the spring configuration file Applicationcontext.xml:

<bean class= "Org.springframework.web.servlet.handler.SimpleMappingExceptionResolver" > <property name= " Defaulterrorview "value=" error "></property> <property name=" Exceptionattribute "value=" ex "></ property> <property name= "exceptionmappings" > <props> <prop key= "Com.core.exce Ption. Businessexception ">business_error</prop> <prop key=" Com.core.exception.ParameterException ">par ameter_error</prop> </props> </property> </bean>

2. Modifiable

JSP interface of each function corresponding to the function of the background, a function independently of the completion of a function, the configuration file determines the function to be executed by each function, when the function corresponding to the operation changes, only need to change the configuration file point to be able to.

3. Performance

4. Security

5. testability

6. Ease of Use

An example of an MVC pattern in a Java Web application

Related Article

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.