zoukankan      html  css  js  c++  java
  • 通用表单处理程序

         HttpSession session = request.getSession();
                                                     List wherecollection=new ArrayList();
                                                     wherecollection.removeAll(wherecollection);
                                                     Enumeration e = request.getParameterNames();
                                                    // if (request.getMethod().equals("POST"))
                                                  //  {
                                                        sResult = Constants.
                                                                FAILING;             
                                                   
                                                     while (e.hasMoreElements()) {
                                                    
                                                         String parameterName = (
                                                                 String) e.
                                                                                nextElement();
                                                         String parameterValue = (
                                                                 String) request.
                                                                                 getParameter(
                                                                                         parameterName);
                                                         System.out.println("参数名称:" +
                                                                            parameterName +
                                                                            "<BR>");
                                                         System.out.println("参数内容:" +
                                                                            parameterValue +
                                                                            "<BR>");
                                                       
                                                         if (checkform(parameterValue,parameterName)==0) {//成功
                                                             addrow(wherecollection,parameterName,parameterValue
                                                                   );
                                                         }
                                                     }
  • 相关阅读:
    (转)我是一个小线程
    Gson本地和服务器环境不同遇到的Date转换问题 Failed to parse date []: Invalid time zone indicator
    Bigdecimal 比较equals与compareTo
    springboot jpa mongodb 多条件分页查询
    springboot Consider defining a bean of type 'xxx' in your configuration
    mongodb you can't add a second
    java8 获取某天最大(23:59:59)和最小时间(00:00:00)
    java volatile详解
    SpringBoot dubbo之class is not visible from class loader
    springboot dubbo filter之依赖注入null
  • 原文地址:https://www.cnblogs.com/bobomail/p/262800.html
Copyright © 2011-2022 走看看