JAVA全系列 教程
3762个小节阅读:7095k
目录
C语言快速入门
JAVA全系列 教程
面向对象的程序设计语言
Python全系列 教程
Python3.x版本,未来主流的版本
人工智能 教程
顺势而为,AI创新未来
大厂算法 教程
算法,程序员自我提升必经之路
C++ 教程
一门通用计算机编程语言
微服务 教程
目前业界流行的框架组合
web前端全系列 教程
通向WEB技术世界的钥匙
大数据全系列 教程
站在云端操控万千数据
AIGC全能工具班
A A
White Night
在SpringBoot中不推荐使用JSP作为动态页面,如果我们要想使用JSP编写动态页面,需要手动添加webapp目录。
由于SpringBoot自带tomcat无法解析JSP,需要在pom文件添加JSP引擎
xxxxxxxxxx
<!--添加jsp引擎,SpringBoot内置的Tomcat不能解析JSP-->
<dependency>
<groupId>org.apache.tomcat.embed</groupId>
<artifactId>tomcat-embed-jasper</artifactId>
</dependency>
将webapp标记为web目录
创建webapp目录,编写JSP文件
xxxxxxxxxx
<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<html>
<head>
<title>MYJSP</title>
</head>
<body>
MYJSP
</body>
</html>
1. 在SpringBoot中,如果要想使用JSP作为动态页面,需要添加__依赖
A servlet引擎
B jsp引擎
C servlet引擎和jsp引擎
D 什么都不需要添加
答案
1=>B