qq_35789834
35789834
2016-10-19 08:06

用浏览器访问Servlet为什么访问不了

package cn.itcast.fristServlet;

import java.io.IOException;

import javax.servlet.Servlet;
import javax.servlet.ServletConfig;
import javax.servlet.ServletException;
import javax.servlet.ServletRequest;
import javax.servlet.ServletResponse;

public class Aservlet implements Servlet {

public void destroy() {
System.out.println("我死了");

}


public ServletConfig getServletConfig() {

    return null;
}

@Override
public String getServletInfo() {
    // TODO Auto-generated method stub
    return null;
}

@Override
public void init(ServletConfig arg0) throws ServletException {
    // TODO Auto-generated method stub
    System.out.println("我出生了");

}

@Override
public void service(ServletRequest arg0, ServletResponse arg1) throws ServletException, IOException {
    // TODO Auto-generated method stub
    System.out.println("我在被调用");
}

}

<?xml version="1.0" encoding="UTF-8"?>


XXX
cn.itcast.fristServlet.Aservlet


XXX
/AAA

  • 点赞
  • 回答
  • 收藏
  • 复制链接分享

2条回答

为你推荐

换一换