tomcat中webapps里的class访问出现500错误,有图!

事件背景:工具:tomcat7,jdk1.7,eclipse mars.2。
起因:看马士兵老师servlet视频,写了个servlet,在控制台打印一句话,也就是在doGet里写System.out.println("hello");
结果:在eclipse运行正常,把class拿出来放到webapps里新建的test/WEB-INF/class里,web.xml也配置好了,但出现500错误,说是名字错误?请指教!
java代码:

package com.bjsxt.servlet;
import java.io.IOException;
import javax.servlet.ServletException;
import javax.servlet.http.HttpServlet;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
public class HW extends HttpServlet {
    protected void doGet(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {
        System.out.println("doGet");
    }
}

web.xml配置:

<?xml version="1.0" encoding="UTF-8"?>
<web-app xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://java.sun.com/xml/ns/javaee" xsi:schemaLocation="http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/web-app_3_0.xsd" id="WebApp_ID" version="3.0">
 
 <servlet>
      <servlet-name>HW</servlet-name>
      <servlet-class>HW</servlet-class>
  </servlet>
  
  <servlet-mapping>
      <servlet-name>HW</servlet-name>
      <url-pattern>/abc</url-pattern>
  </servlet-mapping>
</web-app>

查看回复