目录

  • 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
Maven Web Project

视频基于java17,pom核心配置片段在视频下面。

22级+,基于集成java21的idea,以及新的servlet6.0规范以及新版本打包插件,就不重录了。

http://120.46.159.231:8088/web-project-manager/



pom.xml配置片段

<packaging>war</packaging>
<properties>
   <maven.compiler.source>21</maven.compiler.source>
   <maven.compiler.target>21</maven.compiler.target>
   <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
</properties>
<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>
</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>