📜  java 隐藏表单域 - Java 代码示例

📅  最后修改于: 2022-03-11 14:52:26.263000             🧑  作者: Mango

代码示例1
import java.io.*;
import javax.servlet.*;
import javax.servlet.http.*;

public class First extends HttpServlet {

  protected void doPost(HttpServletRequest request, HttpServletResponse response)
            throws ServletException, IOException {
        response.setContentType("text/html;charset=UTF-8");
        PrintWriter out = response.getWriter();
        
    //getting value submitted in form from HTML file
        String user = request.getParameter("user");
        
        //creating a new hidden form field
        out.println("
"); out.println(""); out.println(""); out.println("
"); } }