为了账号安全,请及时绑定邮箱和手机立即绑定

servlet项目启动报404怎么解决

servlet项目启动报404怎么解决

qq_患得患失_ckwKX6 2019-04-20 09:57:18
使用的是注释,metadata-complete="true",下面是web.xml<?xml version="1.0" encoding="UTF-8"?><web-app xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://xmlns.jcp.org/xml/ns/javaee" xsi:schemaLocation="http://xmlns.jcp.org/xml/ns/javaee http://xmlns.jcp.org/xml/ns/javaee/web-app_3_1.xsd" metadata-complete="true" version="3.1">  <absolute-ordering/>  <display-name>web</display-name>  <welcome-file-list>    <welcome-file>index.html</welcome-file>    <welcome-file>index.htm</welcome-file>    <welcome-file>index.jsp</welcome-file>    <welcome-file>default.html</welcome-file>    <welcome-file>default.htm</welcome-file>    <welcome-file>default.jsp</welcome-file>  </welcome-file-list></web-app>写个打印语句也报404package com.it66.session;import java.io.IOException;import javax.servlet.ServletException;import javax.servlet.annotation.WebServlet;import javax.servlet.http.HttpServlet;import javax.servlet.http.HttpServletRequest;import javax.servlet.http.HttpServletResponse;/** * Servlet implementation class SessionServlet */@WebServlet("/SessionServlet")public class SessionServlet extends HttpServlet { private static final long serialVersionUID = 1L; protected void service(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException { System.out.println("SessionServlet"); }}求大佬帮解决
查看完整描述

1 回答

?
栗喵

TA贡献9条经验 获得超15个赞

把项目名加上在访问试试呢

查看完整回答
反对 回复 2019-04-22
  • 1 回答
  • 0 关注
  • 1385 浏览

添加回答

举报

0/150
提交
取消
意见反馈 帮助中心 APP下载
官方微信