html
登录
## 、java web package demo;import java.io.IOException;
import javax.servlet.Servlet;
import javax.servlet.ServletConfig;
import javax.servlet.ServletException;
import javax.servlet.ServletRequest;
import javax.servlet.ServletResponse;
import javax.servlet.annotation.WebServlet;
//http://127.0.0.1:8080/demo/login.do
@WebServlet("/login.do")
public class LoginServlet implements Servlet{
@Override
public void service(ServletRequest req, ServletResponse resp) throws ServletException, IOException {
//param == parameter == 参数
//从请求对象上获取指定名称的参数
String username = req.getParameter("un");
String password = req.getParameter("pw");
System.out.println(username);
System.out.println(password);
resp.getWriter().println(username);
}
@Override
public void destroy() {
// TODO Auto-gen