目录

  • Introduction
    • ● Maven
    • ● Maven Web Project
    • ● JSP Template
    • ● Tomcat Hot Deploy
    • ● Exp04-CSS Layout
    • ● Exp05-Servlet/FIlter
    • ● Exp06-JSTL
    • ● Exp07-JDBC
    • ● Course Projects
    • ● Git&Github-Web
    • ● Git&Github-Java
  • HTML
    • ● Course Introduction
    • ● HTML Basics
    • ● Table&List&Display
    • ● Form Attributes
  • CSS
    • ● Basics
    • ● Units
    • ● Box Model
    • ● Background&Image&Text&Opacity
    • ● Combinators&Pseudo&Attribute Selectors
    • ● List&Table
    • ● -Inline-Block&Links&Vertical-Align&Float&Position
    • ● Box-sizing&Navigation
    • ● Transitions&Transforms&Card&Dropdowns&Viewport
    • ● Layout
    • ● Lecture08-01-Video
    • ● Lecture08-02-Video
    • ● Responsive Web Design
  • JavaScript
    • ● JavaScript Introduction
    • ● JavaScript Basics
    • ● jQuery
  • Servlet
    • ● Introduction
    • ● Servlet
    • ● Request&Response
    • ● Redirect&RequestDispatcher
    • ● Scope&Header
    • ● Filter&Listener
  • JSP
    • ● Introduction
    • ● EL
    • ● JSTL
    • ● Base&url Tags
    • ● AJAX
  • JDBC
    • ● JDBC Introduction
    • ● Connection&PreparedStatement&ResultSet
    • ● Transaction
    • ● Lecture16-01
    • ● Lecture16-02
  • MVC
    • ● MVC Introduction
  • Homework
    • ● h1-form
    • ● h2-card
    • ● h3-badge
    • ● h4-Navigation Drawer
    • ● h5-Floating Button
    • ● h6-Modal
    • ● Course Timetable Conflicting
    • ● Http Session
JSP Template
以授课时,实际使用的idea/openjdk/tomcat版本为准

JSP3.0,变更为<%@ taglib prefix="c" uri="jakarta.tags.core" %>

JSP模板

<%@ page pageEncoding="UTF-8" %>
<%@ taglib prefix="c" uri="jakarta.tags.core" %>
<!DOCTYPE html>
<html>
 <head>
 <meta charset="UTF-8">
   <title>#[[$Title$]]#</title>
 </head>
 <body>
 #[[$END$]]#
 </body>
</html>


pom.xml片段

<dependencies>
       <!-- https://mvnrepository.com/artifact/jakarta.servlet/jakarta.servlet-api -->
       <dependency>
           <groupId>jakarta.servlet</groupId>
           <artifactId>jakarta.servlet-api</artifactId>
           <version>6.0.0</version>
           <scope>provided</scope>
       </dependency>
       <!-- https://mvnrepository.com/artifact/jakarta.servlet.jsp.jstl/jakarta.servlet.jsp.jstl-api -->
       <dependency>
           <groupId>jakarta.servlet.jsp.jstl</groupId>
           <artifactId>jakarta.servlet.jsp.jstl-api</artifactId>
           <version>3.0.0</version>
       </dependency>
       <!-- https://mvnrepository.com/artifact/org.glassfish.web/jakarta.servlet.jsp.jstl -->
       <dependency>
           <groupId>org.glassfish.web</groupId>
           <artifactId>jakarta.servlet.jsp.jstl</artifactId>
           <version>3.0.1</version>
       </dependency>
   </dependencies>
   <build>
       <plugins>
           <!-- https://mvnrepository.com/artifact/org.apache.maven.plugins/maven-war-plugin -->
           <plugin>
               <groupId>org.apache.maven.plugins</groupId>
               <artifactId>maven-war-plugin</artifactId>
               <version>3.3.2</version>
           </plugin>
       </plugins>
   </build>