SSM Application (iv)--SPRINGMVC Getting Started

Source: Internet
Author: User

The concept of SPRINGMVC

is a web-layer framework, essentially a huge servlet;

All requests are sent to Springmvc, the servlet: @WebServlet ("/");

All the corresponding are SPRINGMVC issued;

SPRINGMVC distribute the request to the corresponding Java class;

SPRINGMVC Container: Manages many instances of a Java class, distributing the requested object;

Web: A problem for handling jumps and data transfer;

Springmvc How to use

First, you need to introduce the jar package required by SPRINGMVC: http://repo.spring.io/release/org/springframework/spring/

Configure SPRINGMVC This servlet, which is configured as a servlet in Web. xml;

SPRINGMVC is a servlet that is used to receive *.action requests;

Configure the SPRINGMVC core configuration file;

SPRINGMVC's core configuration file is essentially a spring configuration file, and an instance of the bean needs to be found;

Tell Dispatcherservlet where to use the core configuration file;

    

What the core configuration file needs to configure:

Request Line:

SPRINGMVC itself is a spring concept: managing the relationship between beans and beans;

Springmvc this servlet needs to find common Java classes (beans)

Response Line:

View counterpart: Springmvc gives a logical view--needs to be converted to a physical view

There are a number of responses returned, looking for physical views (like key-value pairs) in a logical view

View Resolver:

The class that realizes the control layer of SPRINGMVC management: controller;

is the normal Java class for SPRINGMVC distribution requests

With packet scanning, the Hellocontroller class becomes a bean instance that SPRINGMVC can use directly

With view parsing, the return value result is parsed as:/result.jsp;

PS: Due to the limited ability of the author, such as wrong, please understand;

SSM Application (iv)--SPRINGMVC Getting Started

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.