标签:art 定义 span lease name post https import response
<dependency> <groupId>javax.servlet</groupId> <artifactId>javax.servlet-api</artifactId> <version>RELEASE</version> <scope>compile</scope> </dependency>
import javax.servlet.http.HttpServlet;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
public class HelloServlet extends HttpServlet {
@Override
protected void doGet(HttpServletRequest req, HttpServletResponse resp) throws ServletException, IOException {
}
@Override
protected void doPost(HttpServletRequest req, HttpServletResponse resp) throws ServletException, IOException {
doGet(req, resp);
}
}
<servlet> <!--自定义名称--> <servlet-name>HelloServlet</servlet-name> <!--关联类--> <servlet-class>com.doubleh.servlet.HelloServlet</servlet-class> </servlet> <servlet-mapping> <!--映射对应的servlet--> <servlet-name>HelloServlet</servlet-name> <!--路由地址--> <url-pattern>/hello</url-pattern> </servlet-mapping>
标签:art 定义 span lease name post https import response
原文地址:https://www.cnblogs.com/xp2h/p/12344599.html