1. xml 文件 配置
HelloServlet com.qiku.web.HelloServelt HelloServlet /Hello MyWebpages com.qiku.web.MyWebpages MyWebpages /mwp
响应类
package com.qiku.web; import javax.servlet.ServletException; import javax.servlet.http.HttpServlet; import javax.servlet.http.HttpServletRequest; import javax.servlet.http.HttpServletResponse; import java.io.IOException; public class MyWebpages extends HttpServlet { @Override protected void service(HttpServletRequest req, HttpServletResponse resp) throws ServletException, IOException { // super.service(req, resp); System.out.println("Welcome to my webpages"); } }
配置一个新 的 web项目
欢迎分享,转载请注明来源:内存溢出
评论列表(0条)