Springmvc requesting static resources

Source: Internet
Author: User

Add the following configuration in the Springmvc configuration file

<!--
Default-servlet-handler will define a defaultservlethttprequesthandler in the context of SPRINGMVC,
It will screen the request to enter the Dispatcherservlet, and if it is found to be a request that is not mapped, the request is referred to the WEB application server default
Servlet processing. Dispatcherservlet continues processing if it is not a request for a static resource

The name of the default Servlet for the general WEB application Server is defaults.
If the default Servlet name for the WEB server you are using is not default, you need to explicitly specify it through the Default-servlet-name property

-
<mvc:default-servlet-handler/>

Finally in addition

<mvc:annotation-driven></mvc:annotation-driven>

Springmvc requesting static resources

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.