How to configure spring boot through annotations and order to has something similar to <jsp-config> in Web. xml?

Source: Internet
Author: User

JSP file not rendering in Spring Boot Web application

You'll need not the one but the dependencies (Jasper and Jstl) in the your for the to work pom.xml .

   <dependencies>    <dependency>        <groupId>org.springframework.boot</groupId>        <artifactId>spring-boot-starter-web</artifactId>    </dependency>    <dependency>        <groupId>org.apache.tomcat.embed</groupId>        <artifactId>tomcat-embed-jasper</artifactId>        <scope>provided</scope>    </dependency>    <dependency>        <groupId>javax.servlet</groupId>        <artifactId>jstl</artifactId>    </dependency></dependencies>

You just made my day! This helped Me-even though my issue is slightly different-spring wasn ' t evenfinding my. jsp files in /src/main/resources/webapp/WEB-INF/pages . Thank much!

Http://stackoverflow.com/questions/20602010/jsp-file-not-rendering-in-spring-boot-web-application

How to configure spring boot through annotations and order to has something similar to <jsp-config> in Web. xml?

How to configure spring boot through annotations and order to has something similar to in Web. xml?

<jsp-config>    <jsp-property-group>        <url-pattern>*.jsp</url-pattern>        <url-pattern>*.jspf</url-pattern>        <page-encoding>UTF-8</page-encoding>        <scripting-invalid>false</scripting-invalid>        <include-prelude>/WEB-INF/jsp/base.jspf</include-prelude>        <trim-directive-whitespaces>true</trim-directive-whitespaces>        <default-content-type>text/html</default-content-type>    </jsp-property-group></jsp-config>

I think Dave gave a pretty straight forward answer-that Is-there are no Java API defined by the Servlet spec for config Uring JSPs and if you must use it with spring boot you just need to use Web. xml which Spring Boot perfectly supports. This sounds pretty clear to me.

Cheers.

http://stackoverflow.com/questions/24293901/ How-to-configure-spring-boot-through-annotations-in-order-to-have-something-simi

How to configure spring boot through annotations and order to has something similar to <jsp-config> in Web. xml?

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.