网页打不开
打包也打好了 startup也启动了 server也改了
<?xml version="1.0" encoding="UTF-8"?> <project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"> <modelVersion>4.0.0</modelVersion> <groupId>com.imooc</groupId> <artifactId>web-servlet</artifactId> <version>1.0.0-RELEASE</version> <properties> <maven.compiler.source>8</maven.compiler.source> <maven.compiler.target>8</maven.compiler.target> </properties> <packaging>war</packaging> <dependencies> <dependency> <groupId>javax.servlet</groupId> <artifactId>javax.servlet-api</artifactId> <version>3.1.0</version> <scope>provided</scope> </dependency> </dependencies> <build> <finalName>web-servlet</finalName> </build> </project>
<?xml version="1.0" encoding="UTF-8"?> <web-app xmlns="http://xmlns.jcp.org/xml/ns/javaee" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://xmlns.jcp.org/xml/ns/javaee http://xmlns.jcp.org/xml/ns/javaee/web-app_3_1.xsd" version="3.1"> <welcome-file-list> <welcome-file>index.html</welcome-file> <welcome-file>default.html</welcome-file> </welcome-file-list> <servlet> <servlet-name>request</servlet-name> <servlet-class>com.imooc.servlet.RequestServlet</servlet-class> </servlet> <servlet-mapping> <servlet-name>request</servlet-name> <url-pattern>/request</url-pattern> </servlet-mapping> <servlet> <servlet-name>pattern</servlet-name> <servlet-class>com.imooc.servlet.PatternServlet</servlet-class> </servlet> <servlet-mapping> <servlet-name>pattern</servlet-name> <url-pattern>/class/*</url-pattern> </servlet-mapping> <servlet-mapping> <servlet-name>pattern</servlet-name> <url-pattern>*.class</url-pattern> </servlet-mapping> <servlet-mapping> <servlet-name>pattern</servlet-name> <url-pattern>/</url-pattern> </servlet-mapping> <servlet> <servlet-name>initTable</servlet-name> <servlet-class>com.imooc.servlet.startup.InitTableServlet</servlet-class> <init-param> <param-name>database</param-name> <param-value>db01</param-value> </init-param> <load-on-startup>0</load-on-startup> </servlet> <servlet> <servlet-name>import</servlet-name> <servlet-class>com.imooc.servlet.startup.ImportServlet</servlet-class> <init-param> <param-name>file</param-name> <param-value>c:/tmp/demo.txt</param-value> </init-param> <load-on-startup>1</load-on-startup> </servlet> <error-page> <error-code>404</error-code> <location>/error/404.html</location> </error-page> <error-page> <error-code>500</error-code> <location>/error/500.html</location> </error-page> </web-app>
18
收起
恭喜解决一个难题,获得1积分~
来为老师/同学的回答评分吧
0 星