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
                                                                   );
                                                         }
                                                     }
  • 相关阅读:
    UVa 11991 Easy Problem from Rujia Liu?
    UVa 11995 I Can Guess the Data Structure!
    LA 3485 (积分 辛普森自适应法) Bridge
    LA 5009 (三分法求极值) Error Curves
    软帝学院:一万字的Java基础知识总结大全(实用)
    学java可以做些什么
    从零开始学习java一般需要多长时间?
    学习java需要英语很好吗?
    java的8种基本数据类型
    什么是java变量,java变量是什么
  • 原文地址:https://www.cnblogs.com/bobomail/p/262800.html
Copyright © 2011-2022 走看看