Problems with adding JSP support in Springboot

Source: Internet
Author: User
Tags java web

Because you want to use a Java Web project to connect using the Springboot framework, the Java Web Project uses JSP, so you need to introduce JSP support in spring boot

Introduction Method online A lot, and now record the problems you have encountered

The annotations used in my controller are Restcontroller, so you can only display the string in the page when you return the page, such as return "index" result, enter the corresponding URL, the page will display index t_t

This problem has been plagued for a long time, and finally found a solution on the Internet:

The original return "index" this writing to use @controller annotations, and @restcontroller corresponding to return JSP page code as follows:

Public Modelandview Doview () {        Modelandview mv = new Modelandview ("index");         return MV;    }

Original: http://blog.csdn.net/zmken497300/article/details/53418372

Problems with adding JSP support in Springboot

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.