import Java.io.*;
import javax.servlet.*;
import javax.servlet.http.*;
public class ParseServlet
extends HttpServlet {
public void init(ServletConfig config) throws ServletException {
super.init(config);
}
public void service(HttpServletRequest request, HttpServletResponse response) throws
IOException, ServletException {
System.out.println("************** begin ***************");
String method = request.getMethod();
System.out.println("method = " + method);
int contentLength = request.getContentLength();
System.out.println("contentLength = " + contentLength);
System.out.println("ContentType = " + request.getContentType());
//System.out.println("------- 在设定字符编码前 -------");
System.out.println("QueryString = " + request.getQueryString());
//得到ServletInputStream,请留心
:这段代码和得到user的值的代码,不能同时出现,否则
//在后面的那个将会得到空值。
if (method.equalsIgnoreCase("Post")) {