快速业务通道

WAP手机上的问卷调查系统的构建 - 编程入门网

作者 佚名技术 来源 NET编程 浏览 发布时间 2012-06-22
  private static final String VOTE = "vote";   private static final String LOG = "log";   private static final String AFTER = "after";   private static final String VIEW = "view";   private static final String COOKIES = "cookies";   private static final String BGCOLOR = "bgcolor";   private static final String FGCOLOR = "fgcolor";   private static final String SIZE = "size";   private static final String FACE = "face";   private static final String TITLE = "title";   private static final String COLUMN = "column";   private static final String VOTECOLOR = "votecolor";   private static final String DEFBGCOLOR = "#FFFFFF";   private static final String DEFFGCOLOR = "#000000";   private static final String DEFVOTECOLOR = "#FF0000";   private static final String DEFCOOKIES = "0";   private static final String DEFCOLUMN = "1";   private static final String DEFTITLE = "A Free & Simple Vote System";   private static final String OPTIONS = "options";   private static final String EDITED = "edited";   private static final String FICT = "fct";   private static final String WAPVOTE = "wpv";   private static final int MAX_WML = 900;   private static final int MAX_VOTES = 20;   private static String NEWLINE = "\n";   private static Hashtable cfgs;   private static Hashtable forLock;   public void init(ServletConfig config)   throws ServletException    {     super.init(config);     NEWLINE = System.getProperty("line.separator");     cfgs = new Hashtable();     forLock = new Hashtable();    }   file://由于使用POST发送表单,所以现用doPost来处理POST请求    public void doPost(HttpServletRequest request, HttpServletResponse response)     throws ServletException, IOException     {      doGet(request, response); file://调用doGet去处理POST请求     }    public void doGet(HttpServletRequest request, HttpServletResponse response)     file://用于处理GET请求    throws ServletException, IOException     {      String s = "";      String s1 = "";      s = HttpUtils.getRequestURL(request).toString();//把收到的请求转化成字符串      int i;      if((i = s.indexOf("?")) > 0) file://想一想为什么要这么写?      s = s.substring(0, i);      s1 = request.getQueryString(); file://取的请求的字符串      if(s1 == null)//如果为空,既是没有写上配置文件名,故要发出错误信息       {        errorMessage("不能读到配置文件", null, request, response);        return;       }      String s2 = getFromQuery(s1, "config=");//读取请求中"&"后的字符串      if(s2.length() == 0)       s2 = s1;       Str

凌众科技专业提供服务器租用、服务器托管、企业邮局、虚拟主机等服务,公司网站:http://www.lingzhong.cn 为了给广大客户了解更多的技术信息,本技术文章收集来源于网络,凌众科技尊重文章作者的版权,如果有涉及你的版权有必要删除你的文章,请和我们联系。以上信息与文章正文是不可分割的一部分,如果您要转载本文章,请保留以上信息,谢谢!

分享到: 更多

Copyright ©1999-2011 厦门凌众科技有限公司 厦门优通互联科技开发有限公司 All rights reserved

地址(ADD):厦门软件园二期望海路63号701E(东南融通旁) 邮编(ZIP):361008

电话:0592-5908028 传真:0592-5908039 咨询信箱:web@lingzhong.cn 咨询OICQ:173723134

《中华人民共和国增值电信业务经营许可证》闽B2-20100024  ICP备案:闽ICP备05037997号