Compare commits
2 Commits
4e1117bfbe
...
4ce43b02f8
Author | SHA1 | Date |
---|---|---|
Kane Wang | 4ce43b02f8 | |
Kane Wang | 5d93fbd920 |
|
@ -28,9 +28,9 @@
|
|||
<dependency>
|
||||
<groupId>jakarta.servlet</groupId>
|
||||
<artifactId>jakarta.servlet-api</artifactId>
|
||||
<version>6.0.0</version>
|
||||
<scope>provided</scope>
|
||||
<!-- <systemPath>${project.basedir}/src/main/webapp/WEB-INF/lib/servlet-api.jar</systemPath> -->
|
||||
<version>5.0.0</version>
|
||||
<scope>system</scope>
|
||||
<systemPath>${pom.basedir}/src/main/webapp/WEB-INF/lib/servlet-api.jar</systemPath>
|
||||
</dependency>
|
||||
</dependencies>
|
||||
|
||||
|
@ -43,7 +43,7 @@
|
|||
<artifactId>maven-clean-plugin</artifactId>
|
||||
<version>3.1.0</version>
|
||||
</plugin>
|
||||
<!-- see http://maven.apache.org/ref/current/maven-core/default-bindings.html#Plugin_bindings_for_war_packaging -->
|
||||
<!-- see http://maven.apache.org/ref/current/ven-core/efault-bindings.html#Plugin_bindings_for_war_packaging -->
|
||||
<plugin>
|
||||
<artifactId>maven-resources-plugin</artifactId>
|
||||
<version>3.0.2</version>
|
||||
|
|
|
@ -2,7 +2,7 @@
|
|||
* @Author: Kane
|
||||
* @Date: 2022-08-23 21:28:26
|
||||
* @LastEditors: Kane
|
||||
* @LastEditTime: 2022-08-24 22:26:43
|
||||
* @LastEditTime: 2022-08-25 10:45:45
|
||||
* @FilePath: \tomcat-servlet\src\main\java\com\cpic\xim\ServletTest.java
|
||||
* @Description:
|
||||
*
|
||||
|
@ -22,12 +22,14 @@ import jakarta.servlet.http.HttpSession;
|
|||
public class ServletTest extends HttpServlet
|
||||
{
|
||||
|
||||
/**
|
||||
/*********************************************
|
||||
* 测试tomcat 10.x的servlet对象。
|
||||
*
|
||||
* @param request
|
||||
* @param response
|
||||
*/
|
||||
* @exception ServletException
|
||||
* @exception IOException
|
||||
********************************************/
|
||||
@Override
|
||||
public void doGet( HttpServletRequest request, HttpServletResponse response )
|
||||
throws ServletException, IOException
|
||||
|
@ -55,6 +57,13 @@ public class ServletTest extends HttpServlet
|
|||
writer.write( " " );
|
||||
}
|
||||
|
||||
/*****************************************************
|
||||
*
|
||||
* @param request
|
||||
* @param response
|
||||
* @exception ServletException
|
||||
* @exception IOException
|
||||
*****************************************************/
|
||||
@Override
|
||||
public void doPost( HttpServletRequest request, HttpServletResponse response )
|
||||
{
|
||||
|
|
|
@ -1,22 +0,0 @@
|
|||
/*
|
||||
* @Author: Kane
|
||||
* @Date: 2022-08-23 23:58:05
|
||||
* @LastEditors: Kane
|
||||
* @LastEditTime: 2022-08-24 21:14:09
|
||||
* @FilePath: \tomcat-servlet\src\test\java\com\cpic\xim\ServletTest.java
|
||||
* @Description:
|
||||
*
|
||||
* Copyright (c) ${2022} by Kane, All Rights Reserved.
|
||||
*/
|
||||
package com.cpic.xim;
|
||||
|
||||
import org.junit.Test;
|
||||
|
||||
public class ServletTest
|
||||
{
|
||||
@Test
|
||||
public void servletTest()
|
||||
{
|
||||
|
||||
}
|
||||
}
|
|
@ -1,4 +0,0 @@
|
|||
#Created by Apache Maven 3.8.5
|
||||
artifactId=tomcat-servlet
|
||||
groupId=com.cpic.xim
|
||||
version=1.0-SNAPSHOT
|
|
@ -1 +0,0 @@
|
|||
com\cpic\xim\ServletTest.class
|
|
@ -1 +0,0 @@
|
|||
D:\develop\study\servlet-learning\tomcat-servlet\tomcat-servlet\src\main\java\com\cpic\xim\ServletTest.java
|
|
@ -1 +0,0 @@
|
|||
com\cpic\xim\ServletTest.class
|
|
@ -1 +0,0 @@
|
|||
D:\develop\study\servlet-learning\tomcat-servlet\tomcat-servlet\src\test\java\com\cpic\xim\ServletTest.java
|
|
@ -1,60 +0,0 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<testsuite xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="https://maven.apache.org/surefire/maven-surefire-plugin/xsd/surefire-test-report.xsd" name="com.cpic.xim.ServletTest" time="0.035" tests="1" errors="0" skipped="0" failures="0">
|
||||
<properties>
|
||||
<property name="java.specification.version" value="18"/>
|
||||
<property name="sun.cpu.isalist" value="amd64"/>
|
||||
<property name="sun.jnu.encoding" value="GBK"/>
|
||||
<property name="java.class.path" value="D:\develop\study\servlet-learning\tomcat-servlet\tomcat-servlet\target\test-classes;D:\develop\study\servlet-learning\tomcat-servlet\tomcat-servlet\target\classes;D:\DevTools\maven\Repository\junit\junit\4.11\junit-4.11.jar;D:\DevTools\maven\Repository\org\hamcrest\hamcrest-core\1.3\hamcrest-core-1.3.jar;D:\DevTools\maven\Repository\jakarta\servlet\jakarta.servlet-api\6.0.0\jakarta.servlet-api-6.0.0.jar;"/>
|
||||
<property name="java.vm.vendor" value="Oracle Corporation"/>
|
||||
<property name="sun.arch.data.model" value="64"/>
|
||||
<property name="user.variant" value=""/>
|
||||
<property name="java.vendor.url" value="https://java.oracle.com/"/>
|
||||
<property name="user.timezone" value="Asia/Shanghai"/>
|
||||
<property name="os.name" value="Windows 10"/>
|
||||
<property name="java.vm.specification.version" value="18"/>
|
||||
<property name="sun.java.launcher" value="SUN_STANDARD"/>
|
||||
<property name="user.country" value="CN"/>
|
||||
<property name="sun.boot.library.path" value="C:\java\openJDK\jdk-18\bin"/>
|
||||
<property name="sun.java.command" value="C:\Users\wangk\AppData\Local\Temp\surefire3698304039659127991\surefirebooter7897493067332223907.jar C:\Users\wangk\AppData\Local\Temp\surefire3698304039659127991 2022-08-24T17-59-45_984-jvmRun1 surefire1460857177213782776tmp surefire_02746890765511052528tmp"/>
|
||||
<property name="jdk.debug" value="release"/>
|
||||
<property name="surefire.test.class.path" value="D:\develop\study\servlet-learning\tomcat-servlet\tomcat-servlet\target\test-classes;D:\develop\study\servlet-learning\tomcat-servlet\tomcat-servlet\target\classes;D:\DevTools\maven\Repository\junit\junit\4.11\junit-4.11.jar;D:\DevTools\maven\Repository\org\hamcrest\hamcrest-core\1.3\hamcrest-core-1.3.jar;D:\DevTools\maven\Repository\jakarta\servlet\jakarta.servlet-api\6.0.0\jakarta.servlet-api-6.0.0.jar;"/>
|
||||
<property name="sun.cpu.endian" value="little"/>
|
||||
<property name="user.home" value="C:\Users\wangk"/>
|
||||
<property name="user.language" value="zh"/>
|
||||
<property name="java.specification.vendor" value="Oracle Corporation"/>
|
||||
<property name="java.version.date" value="2022-03-22"/>
|
||||
<property name="java.home" value="C:\java\openJDK\jdk-18"/>
|
||||
<property name="file.separator" value="\"/>
|
||||
<property name="basedir" value="D:\develop\study\servlet-learning\tomcat-servlet\tomcat-servlet"/>
|
||||
<property name="java.vm.compressedOopsMode" value="Zero based"/>
|
||||
<property name="line.separator" value=" "/>
|
||||
<property name="java.vm.specification.vendor" value="Oracle Corporation"/>
|
||||
<property name="java.specification.name" value="Java Platform API Specification"/>
|
||||
<property name="surefire.real.class.path" value="C:\Users\wangk\AppData\Local\Temp\surefire3698304039659127991\surefirebooter7897493067332223907.jar"/>
|
||||
<property name="user.script" value=""/>
|
||||
<property name="sun.management.compiler" value="HotSpot 64-Bit Tiered Compilers"/>
|
||||
<property name="java.runtime.version" value="18+36-2087"/>
|
||||
<property name="user.name" value="wangwei-202"/>
|
||||
<property name="path.separator" value=";"/>
|
||||
<property name="os.version" value="10.0"/>
|
||||
<property name="java.runtime.name" value="OpenJDK Runtime Environment"/>
|
||||
<property name="file.encoding" value="UTF-8"/>
|
||||
<property name="java.vm.name" value="OpenJDK 64-Bit Server VM"/>
|
||||
<property name="localRepository" value="D:\DevTools\maven\Repository"/>
|
||||
<property name="java.vendor.url.bug" value="https://bugreport.java.com/bugreport/"/>
|
||||
<property name="java.io.tmpdir" value="C:\Users\wangk\AppData\Local\Temp\"/>
|
||||
<property name="java.version" value="18"/>
|
||||
<property name="user.dir" value="D:\develop\study\servlet-learning\tomcat-servlet\tomcat-servlet"/>
|
||||
<property name="os.arch" value="amd64"/>
|
||||
<property name="java.vm.specification.name" value="Java Virtual Machine Specification"/>
|
||||
<property name="sun.os.patch.level" value=""/>
|
||||
<property name="native.encoding" value="GBK"/>
|
||||
<property name="java.library.path" value="C:\java\openJDK\jdk-18\bin;C:\Windows\Sun\Java\bin;C:\Windows\system32;C:\Windows;C:\Program Files\PowerShell\7-preview;C:\Program Files (x86)\VMware\VMware Workstation\bin\;C:\Program Files\VanDyke Software\Clients\;C:\java\openJDK\jdk-18\;C:\Python310\Scripts\;C:\Python310\;C:\Program Files\Common Files\Oracle\Java\javapath;c:\oracle\product\19.0.0\client_1\bin;C:\Program Files (x86)\Common Files\Oracle\Java\javapath;C:\Program Files\VanDyke Software\Clients_bak\;C:\Windows\system32;C:\Windows;C:\Windows\System32\Wbem;C:\Windows\System32\WindowsPowerShell\v1.0\;C:\Windows\System32\OpenSSH\;C:\Program Files (x86)\Microsoft SQL Server\110\Tools\Binn\;C:\Program Files\Microsoft SQL Server\110\Tools\Binn\;C:\Program Files\Microsoft SQL Server\110\DTS\Binn\;C:\Program Files\dotnet\;D:\develop\sdk\cpp\libxl\libxl-3.8.5.0\bin64;D:\develop\sdk\cpp\ocilib\4.6.3\lib64;C:\Program Files\Microsoft SQL Server\120\Tools\Binn\;C:\Program Files (x86)\SecCertClientSz;C:\Program Files\7-Zip;C:\ProgramData\chocolatey\bin;C:\Program Files\CMake\bin;C:\Strawberry\c\bin;C:\Strawberry\perl\site\bin;C:\Strawberry\perl\bin;C:\Program Files\nodejs\;d:\DevTools\maven\apache-maven-3.8.5\bin;C:\Program Files\PowerShell\7-preview\preview;C:\Program Files\Git\cmd;C:\Users\wangk\AppData\Local\Microsoft\WindowsApps;C:\Users\wangk\AppData\Local\Programs\Microsoft VS Code\bin;C:\Program Files\JetBrains\IntelliJ IDEA 2022.1.3\bin;C:\Users\wangk\.dotnet\tools;C:\Users\wangk\AppData\Roaming\npm;."/>
|
||||
<property name="java.vm.info" value="mixed mode, sharing"/>
|
||||
<property name="java.vendor" value="Oracle Corporation"/>
|
||||
<property name="java.vm.version" value="18+36-2087"/>
|
||||
<property name="sun.io.unicode.encoding" value="UnicodeLittle"/>
|
||||
<property name="java.class.version" value="62.0"/>
|
||||
</properties>
|
||||
<testcase name="servletTest" classname="com.cpic.xim.ServletTest" time="0.003"/>
|
||||
</testsuite>
|
|
@ -1,4 +0,0 @@
|
|||
-------------------------------------------------------------------------------
|
||||
Test set: com.cpic.xim.ServletTest
|
||||
-------------------------------------------------------------------------------
|
||||
Tests run: 1, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 0.035 s - in com.cpic.xim.ServletTest
|
|
@ -1,15 +0,0 @@
|
|||
<!DOCTYPE web-app PUBLIC "-//Sun Microsystems, Inc.//DTD Web Application 2.3//EN" "http://java.sun.com/dtd/web-app_2_3.dtd">
|
||||
|
||||
<web-app>
|
||||
<display-name>Archetype Created Web Application</display-name>
|
||||
|
||||
<servlet>
|
||||
<servlet-name>ServletTest</servlet-name>
|
||||
<servlet-class>com.cpic.xim.ServletTest</servlet-class>
|
||||
</servlet>
|
||||
<servlet-mapping>
|
||||
<servlet-name>ServletTest</servlet-name>
|
||||
<url-pattern>/test</url-pattern>
|
||||
</servlet-mapping>
|
||||
|
||||
</web-app>
|
|
@ -1,24 +0,0 @@
|
|||
<!--
|
||||
* @Author: Kane
|
||||
* @Date: 2022-08-23 21:26:04
|
||||
* @LastEditors: Kane
|
||||
* @LastEditTime: 2022-08-23 21:51:29
|
||||
* @FilePath: \tomcat-servlet\src\main\webapp\index.jsp
|
||||
* @Description:
|
||||
*
|
||||
* Copyright (c) ${2022} by Kane, All Rights Reserved.
|
||||
-->
|
||||
<%@ page pageEncoding="UTF-8" contentType="text/html" %>
|
||||
<!DOCTYPE html>
|
||||
<html lang="en">
|
||||
<head>
|
||||
<meta charset="UTF-8" />
|
||||
<meta http-equiv="X-UA-Compatible" content="IE=edge" />
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
|
||||
<title>测试Tomcat 10.X</title>
|
||||
</head>
|
||||
<body>
|
||||
<a href="./test">访问servlet</a>
|
||||
</body>
|
||||
</html>
|
||||
|
Loading…
Reference in New Issue