Idea集成工具玩转web-maven项目

1.Controller注解:

package com.controller;

import javax.servlet.ServletException;
import javax.servlet.annotation.WebServlet;
import javax.servlet.http.HttpServlet;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import java.io.IOException;

@WebServlet("/HServlet")
public class HServlet extends HttpServlet {
    protected void doPost(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {

    }

    protected void doGet(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {
        String name = request.getParameter("username");
        System.out.println("Hello meimei");
        System.out.println(name);

    }
}

2.前端jsp

<%@ page contentType="text/html;charset=UTF-8" language="java" %>

  
    $Title$
  

你可能感兴趣的:(研发管理)