JSP file not rendering in Spring Boot web application

You will need not one but two dependencies (jasper and jstl) in your pom.xml for this to work.

   <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 was slightly different - Spring wasn't evenfinding my .jsp files in /src/main/resources/webapp/WEB-INF/pages. Thank you so much!

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

How to configure spring boot through annotations in order to have something similar to <jsp-config> in web.xml?

How to configure spring boot through annotations in order to have 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 is no Java API defined by the Servlet spec for configuring 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 in order to have something similar to <jsp-config> in web.xml?的更多相关文章

  1. Spring Boot 学习系列(08)—自定义servlet、filter及listener

    此文已由作者易国强授权网易云社区发布. 欢迎访问网易云社区,了解更多网易技术产品运营经验. 传统的filter及listener配置 在传统的Java web项目中,servlet.filter和li ...

  2. spring boot测试

    今天在springside里试了spring boot,果然很方便,内置容器,不需要配置web.xml,简单几个文件就可以实现增删改查操作,一些配置如tomcat端口之类的直接写在applicatio ...

  3. Spring Boot Reference Guide

    Spring Boot Reference Guide Authors Phillip Webb, Dave Syer, Josh Long, Stéphane Nicoll, Rob Winch,  ...

  4. spring boot redis分布式锁 (转)

    一. Redis 分布式锁的实现以及存在的问题 锁是针对某个资源,保证其访问的互斥性,在实际使用当中,这个资源一般是一个字符串.使用 Redis 实现锁,主要是将资源放到 Redis 当中,利用其原子 ...

  5. Spring boot参考指南

    介绍 转载自:https://www.gitbook.com/book/qbgbook/spring-boot-reference-guide-zh/details 带目录浏览地址:http://ww ...

  6. Spring Boot文档

    本文来自于springboot官方文档 地址:https://docs.spring.io/spring-boot/docs/current/reference/html/ Spring Boot参考 ...

  7. Enable HTTPS in Spring Boot

    Spring-boot-enable-ssl Enable HTTPS in Spring Boot APRIL 14, 2015DRISS AMRI This weekend I answered ...

  8. Manage Spring Boot Logs with Elasticsearch, Logstash and Kibana

    下载地址:https://www.elastic.co/downloads When time comes to deploy a new project, one often overlooked ...

  9. Spring Boot MyBatis 连接数据库

    最近比较忙,没来得及抽时间把MyBatis的集成发出来,其实mybatis官网在2015年11月底就已经发布了对SpringBoot集成的Release版本,Github上有代码:https://gi ...

随机推荐

  1. python3 登录验证小程序,同一用户输错三次密码,锁定账户

    ''' 让用户输入用户名密码 认证成功后显示欢迎信息用户3次认证失败后,退出程序,再次启动程序尝试登录时,还是锁定状态''' # !/usr/bin/env python # -*- coding:u ...

  2. zoj 2724 Windows Message Queue 优先队列

    http://acm.zju.edu.cn/onlinejudge/showProblem.do?problemId=1724 题目大意: 给出两种操作,GET要求取出当前队首的元素,而PUT会输入名 ...

  3. Spring Boot系列二 Spring @Async异步线程池用法总结

    1. TaskExecutor Spring异步线程池的接口类,其实质是java.util.concurrent.Executor Spring 已经实现的异常线程池: 1. SimpleAsyncT ...

  4. 3、linux下Socket编程-TCP/UDP

    1.什么是Socket 网络的 Socket数据传输是一种特殊的I/O,Socket也是一种文件描述符.Socket也具有一个类似于打开文件的函数调用Socket(),该函数返 回一个整型的Socke ...

  5. 【例题5-2 UVA - 101】The Blocks Problem

    [链接] 我是链接,点我呀:) [题意] 在这里输入题意 [题解] 用vector模拟就好. resize的时候,只是把多余的清理掉. 原先的不会变的. [错的次数] 在这里输入错的次数 [反思] 在 ...

  6. Android自定义组件系列【9】——Canvas绘制折线图

    有时候我们在项目中会遇到使用折线图等图形,Android的开源项目中为我们提供了很多插件,但是很多时候我们需要根据具体项目自定义这些图表,这一篇文章我们一起来看看如何在Android中使用Canvas ...

  7. JSP自己定义标签

    JSP自己定义标签 API文档: http://docs.oracle.com/javaee/7/api/ watermark/2/text/aHR0cDovL2Jsb2cuY3Nkbi5uZXQvZ ...

  8. Eclipse 快捷键大全 分类: C_OHTERS 2014-06-01 13:05 332人阅读 评论(0) 收藏

      精选常用: 1.  ctrl+shift+r:打开资源 这可能是所有快捷键组合中最省时间的了.这组快捷键可以让你打开你的工作区中任何一个文件,而你只需要按下文件名或mask名中的前几个字母,比如a ...

  9. bash - move faster

    http://teohm.com/blog/shortcuts-to-move-faster-in-bash-command-line/ Shortcuts to move faster in Bas ...

  10. PEM_密钥对生成与读取方法

    PS:欢迎转载,但请注明出处,谢谢配合. 前言: PEM是OpenSSL和许多其他SSL工具的标准格式,OpenSSL 使用PEM 文件格式存储证书和密钥.这种格式被设计用来安全的包含在ascii甚至 ...