标签:mys close span content html xtend vax pre http
前期准备
1.eclipse下载配置
2.tomcat下载配置
package com.zlj; import java.io.IOException; import java.io.PrintWriter; import javax.servlet.ServletException; import javax.servlet.http.HttpServlet; import javax.servlet.http.HttpServletRequest; import javax.servlet.http.HttpServletResponse; public class MyServletDemo extends HttpServlet { /** * */ private static final long serialVersionUID = 4453896088111078312L; private String mymsg; public void init() throws ServletException { mymsg = "Hello World!"; } @Override protected void doGet(HttpServletRequest req, HttpServletResponse resp) throws ServletException, IOException { // TODO Auto-generated method stub // super.doGet(req, resp); resp.setContentType("text/html"); PrintWriter out = resp.getWriter(); out.println("<h1>" + mymsg + "</h1>"); } }
标签:mys close span content html xtend vax pre http
原文地址:https://www.cnblogs.com/tom2015010203/p/13207965.html