String event = req.getParameter("event");你这样get。post 都可以用啊。我知道servlet有doPost 和doget你可以试试

解决方案 »

  1.   

        /**
         *
         * Returns the name of the HTTP method with which this 
         * request was made, for example, GET, POST, or PUT.
         * Same as the value of the CGI variable REQUEST_METHOD.
         *
         * @return a <code>String</code> 
         * specifying the name
         * of the method with which
         * this request was made
         *
         */
     
        public String getMethod();
      

  2.   


     String method = request.getMethod();
            if ("GET".equals(method)) {
               
            } else if ("POST".equals(method)) {
                
            }