µ±Ç°Î»ÖãºLinux½Ì³Ì - Linux - ÔÙ̸ͨ¹ý Java Ö´ÐÐ POST ²Ù×÷

ÔÙ̸ͨ¹ý Java Ö´ÐÐ POST ²Ù×÷



        

    John D. Mitchell



    ÕªÒª
    ÔÚ JavaWorld °ËÔºÅÖУ¬ÎÒÃÇѧϰÁËһƪ Java ¼¼ÇÉ£¬¡°´Ó applet ÖÐÖ´ÐÐ POST ²Ù×÷¡±¡£ÄÇƪ¼¼Çɲ»½öÉîÊܶÁÕß»¶Ó­£¬¶øÇÒ»¹Òý³öÁËÐí¶àÎÊÌâ¡£¹ØÓÚͨ¹ý Java Ö´ÐÐ POST ²Ù×÷µÄÕâƪм¼ÇÉÊÔͼÂú×ãÄúµÄºÃÆæÐÄ¡£ÎÒ½«ÏòÄúչʾÈçºÎÏò Web ·þÎñÆ÷·¢ËÍ POST ÇëÇ󣬲¢ÔÚ applet Öн«ÏìÓ¦ÏÔʾ³öÀ´¡£
    ÎÒµÄÉÏһƪ¹ØÓÚ´Ó applet ÖÐÖ´ÐÐ POST ²Ù×÷µÄ¼¼ÇÉÔÚ¶ÁÕßÖÐÒý³öÁËÐí¶àÎÊÌâ¡£ÆäÖÐ×îÍ»³öµÄÎÊÌâÊÇ£º¡°ÈçºÎÏÔʾÓÉ Web ·þÎñÆ÷É쵀 POST CGI-bin ´¦Àí³ÌÐò·µ»ØµÄ HTML Îĵµ£¿¡±¡£ÔÚÕâƪ¼¼ÇÉÖУ¬ÎÒÃǽ«Ì½Ë÷ÕâÒ»ÎÊÌâµÄ½â¾ö·½·¨£¬²¢ÉîÈëÑо¿¼¸¸öºÜ°ôµÄ·þÎñÆ÷¶ËµÄ Java ÎÊÌâ¡£
    ×¢Ò⣺±¾¼¼Çɼٶ¨ÄúÖªµÀ¶ÁÕßÌá³öµÄÓйØͨ¹ý Java Ö´ÐÐ POST ²Ù×÷µÄһЩ»ù±¾ÎÊÌâ¡£Èç¹ûÄú»¹²»ÊìϤÕâЩ¸ÅÄÇë²Î¿¼¡°Java ¼¼ÇÉ 34¡±¡£

    ÄÇô£¬ÎÒÃÇÈçºÎÏÔʾÀ´×Ô applet µÄ POST µÄ½á¹ûÄØ£¿ÕâÒ»ÎÊÌâÓÐËĸö´ð°¸¡£°´ÕÕÄÑÒ׳̶ȵÝÔöµÄ˳ÐòÅÅÁУ¬ÒÀ´ÎΪ£º


    ÎÞ·¨ÏÔʾ¡£
    ±ðÖ´ÐÐ POST ²Ù×÷¡£
    ʹÓà bean¡£
    ×÷±×¡£
    ÕýÈçÔÚ¡°Java ¼¼ÇÉ 34¡±ÖÐÌÖÂÛµÄÄÇÑù£¬ä¯ÀÀÆ÷Ä¿Ç°ËùÓõݲȫÐÔ¹ÜÀíÆ÷²»ÔÊÐíÔÚä¯ÀÀÆ÷ÖÐÏÔʾÓÉ applet Éú³ÉµÄ HTML£»ä¯ÀÀÆ÷½öÔÊÐíÎÒÃǽ«ËüÖ¸Ïò URL£¬URL ½«´ú±íÎÒÃǽ«ËüÏÔʾ³öÀ´¡£ÕâÖÖÇé¿öÄÑÒÔÁîÈËÂúÒ⣡

    ÎÒÃÇͨ¹ý -- ÄÑÒÔÖÃÐÅ£¡ -- ²»Ê¹Óà POST ¾Í¿ÉÒԱܿªÏÔʾ POST ½á¹ûµÄÕâÖÖÏÞÖÆ¡£ÎÒÃÇ¿ÉÒÔ½«Ò»Ð©ÐÅÏ¢±àÂëÔÚ URL ÖУ¬È»ºóÔÙ½«±àÂëºóµÄ URL Ìṩ¸ø showDocument() ·½·¨¡£ÕâЩÐÅÏ¢¿É×÷Ϊ GET ÇëÇóµÄ²ÎÊý´«µÝ¸ø Web ·þÎñÆ÷¡£²»ÐÒµÄÊÇ£¬Õâ´æÔÚһЩȱÏÝ£ºÖ»ÄÜ´«ÊäÊýÁ¿ÓÐÏÞµÄÊý¾Ý -- ´ËÍ⣬ÔÚÕâ¸ö¹ý³ÌÖÐ URL ±»¸ü¸Ä¡£ÕâÑù×öÏ൱±¿×¾¡£ÉÔºóÎÒÃǻῴµ½²ÉÓÃÕâÖÖ±àÂ뷽ʽµÄÒ»¸öʾÀý¡£

    ×î½ü£¬Sun µÄ JavaSoft ·Ö¹«Ë¾·¢²¼ÁË HTML renderer bean¡££¨»¹Óм¸¸ö±ðµÄÉÌÓÃÈí¼þ¡££©ÕâÑù£¬½«Õâ¸ö bean ×÷Ϊ applet µÄÒ»²¿·Ö²¢ÓÃËüÀ´ÏÔʾÍøÒ³¾Í³ÉΪ¿ÉÄÜ¡£ÓÐʲôȱµã£¿´óС¡¢¼æÈÝÐԺͳɱ¾¡£Õâ¸ö bean µ±È»²»Ð¡£¬ËüÐèÒªÖ§³Ö bean µÄä¯ÀÀÆ÷£¬¶øÇÒ²»ÊÇÃâ·ÑµÄ¡£µ±È»£¬ÎÒÃÇÍêÈ«¿ÉÒÔ»¨Ê±¼äÀ´±àд×Ô¼ºµÄ·­Òë×é¼þ£¬µ«ÄÇÊÇÒ»ÖÖÓÞ´ÀµÄ×ö·¨¡£

    Õâ¸öÎÊÌâµÄÒ»ÖÖÓÐȤ¶øÓн¨ÉèÐԵĽâ¾ö·½°¸¾ÍÊÇ×÷±×¡£ÔÚÕâ¸öÌØÀýÖУ¬ÎÒÃÇÈ÷þÎñÆ÷¶ËµÄ´úÂ루ÀýÈ磬 CGI-bin ½Å±¾£©ÓëÎÒÃÇµÄ applet ¹²Í¬×÷±×¡£»ù±¾Ë¼ÏëºÜ¼òµ¥£º½« POST ÓëËæºóµÄ GET ½áºÏÆðÀ´Ê¹Óá£Õâ¸ö¹ý³ÌÈçÏÂËùʾ£º


    applet ÈÔȻͨ¹ý POST ²Ù×÷½«ÐÅÏ¢·¢Ë͸ø·þÎñÆ÷¡£
    ·þÎñÆ÷ÀûÓà POST ÐÅÏ¢Éú³É HTML¡£
    ·þÎñÆ÷½« HTML ±£´æµ½ Web ·þÎñÆ÷ÉϵÄÎļþÖС£
    ·þÎñÆ÷Ïò applet ·µ»ØÒ»¸öħÁ¦¼ü¡£
    applet ½«Õâ¸ö¼ü±àÂëÔÚ URL Öв¢·µ»Ø¸ø·þÎñÆ÷¡£
    applet ͨ¹ýÔÚ showDocument() µ÷ÓÃÖÐʹÓÃÉú³ÉµÄ URL À´Í¨Öªä¯ÀÀÆ÷ÏÔʾÍøÒ³¡£
    ·þÎñÆ÷½ÓÊÕ GET ÇëÇó²¢ÌáȡħÁ¦¼ü²ÎÊý¡£
    ·þÎñÆ÷¼ìË÷Óë´ËħÁ¦¼üÏà¹ØµÄÎļþ¡£
    ·þÎñÆ÷½«ÎļþÖÐµÄ HTML ÄÚÈÝ·µ»Ø¸øä¯ÀÀÆ÷¡£
    ä¯ÀÀÆ÷½« HTML ÄÚÈÝÏÔʾ³öÀ´¡£
    ÕâÖÖ·µ»Ø´¦ÀíÎÞÒɱÈÆäËû½â¾ö·½°¸¸ü¸´ÔÓ£¬µ«ÏÖÔÚÕâÖÖ´¦ÀíÊÊÓÃÓÚ¿Í»§»úºÍ·þÎñÆ÷µÄ¹ã·º×éºÏ·½Ê½¡£ÕâÖÖ´¦ÀíµÄȱµãÔÚÓÚ£¬Íê³ÉÒ»¸öÍêÕûµÄÊÂÎñ±ØÐëÖ´Ðжà¸ö HTTP ÇëÇó¡£ÎÒÃDZØÐëÔÚ¶à¸öÇëÇóµÄÖ®¼äά»¤¡°×´Ì¬¡±ÐÅÏ¢£¬ÒÔ±ãÄܸú×ÙÕýÔÚ½øÐеÄÊÂÎñ£¨»ØÒäһϣ¬HTTP ÊÇÒ»ÖÖÎÞ״̬µÄÇëÇó/ÏìӦЭÒ飩¡£ÎȽ¡µØ´¦ÀíÕâЩ±ØÒªµÄ״̬ÐÅÏ¢¿ÉÄÜÏ൱¾ßÓÐÌôÕ½ÐÔ¡£Tcl ½Å±¾ÓïÑÔ¼° Sprite ·Ö²¼Ê½²Ù×÷ϵͳ֮¸¸ John Ousterhout Ôø¾­Ëµ¹ý£º¡°ÔÚ·Ö²¼Ê½¼ÆËãÖУ¬×´Ì¬ÊǵڶþÂé·³µÄÎÊÌâ¡£²»£¬ËüÊÇ×îÂé·³µÄÎÊÌâ¡£¡±

    ·þÎñÆ÷²¿·Ö×ÔÓ£¬ËùÒÔÈÃÎÒÃÇÏÈÀ´¿´Ò»Ï applet¡£:-) Õâ¸ö applet ÓëÒÔÇ°µÄ¡°Java ¼¼ÇÉ 34¡±ÖÐËùÓÃµÄ Happy applet ½öÓм¸µãÇø±ð¡£µ½·þÎñÆ÷µÄ POST ²Ù×÷ÊÇÏàͬµÄ£¬µ«ÎÒÃDZØÐëÐ޸ĶÁÈ¡·þÎñÆ÷ÏìÓ¦µÄµÄ²¿·Ö£º input = new DataInputStream (urlConn.getInputStream ());

    String str = null;
    String firstLine = null;
    while (null != ((str = input.readLine())))
    {
    if (null == firstLine)
    firstLine = str;

    System.out.println (str);
    textArea.appendText (str + " ");
    }

    input.close ();
    ¾­¹ýÐí¿É£¬·þÎñÆ÷·µ»ØħÁ¦¼ü×÷ΪµÚÒ»ÐС£Ä§Á¦¼üÊÇÒ»¶Î״̬ÐÅÏ¢£¬´ËÐÅÏ¢ÓÃÀ´Î¨Ò»±êʶ applet ËùÉæ¼°µÄ¡¢Óë´Ë·þÎñÆ÷ÓйصÄÊÂÎñ¡£Èç¹ûÔÚ´¦Àí POST ÇëÇóµÄ¹ý³ÌÖÐÓöµ½ÈκÎÎÊÌ⣬·þÎñÆ÷ͨ¹ýÒÔÏ·½Ê½½«ÕâÒ»Çé¿ö֪ͨ applet£º·µ»Ø "nil" ×Ö·û´®£¬²¢½ô½Ó×Å·µ»ØÕâÒ»ÎÊÌâµÄÎı¾ÃèÊö¡£applet ÏÖÔÚËùÒª×öµÄΨһ²Ù×÷¾ÍÊǹ¹½¨ URL£¬²¢µ÷Óà showDocument() À´ÏÔʾ HTML£º if (null != firstLine)
    {
    url = new URL ("http://" +
    ((getCodeBase()).getHost()).toString() +
    "/poster?" + firstLine);
    (getAppletContext()).showDocument (url, "_blank");
    }
    Ò»¶¨Òª×¢Ò⣬URL ²ÎÊý±ØÐëÊÇ URL ±àÂëµÄ¡£ÔÚÉÏÃæµÄ´úÂë¶ÎÖУ¬ÒòΪÀ´×Ô·þÎñÆ÷µÄħÁ¦¼üÒѱ»°²È«±àÂ룬ËùÒÔÎÒÃÇÖ»ÐèÌí¼ÓÎʺŽ«»ù×¼ URL ÓëËù´«µÝµÄ²ÎÊý·Ö¸ô¿ª¡£

    ÏÖÔÚÎÒÃÇÒÑÌÖÂÛÁË applet ²¿·Ö£¬ÏÂÃæ¸ÃÑо¿·þÎñÆ÷ÁË¡£ÔÚÒÔÇ°ÓÐ¹Ø POST µÄһƪ Java ¼¼ÇÉÖУ¬·þÎñÆ÷¶ËµÄ´úÂëÊÇÓà Perl ±àдµÄ´«Í³ CGI-bin ½Å±¾¡£Perl ÊÇÒ»ÖÖ²»´íµÄ½â¾ö·½°¸£¬µ«ÊÇÄúÄѵÀ²»ÏëÓà Java ±àд·þÎñÆ÷¶ËµÄ´úÂëÂð£¿ÎÒÃÇ¿ÉÒÔÓà Java ±àд CGI-bin ½Å±¾£¨Çë²ÎÔIJο¼×ÊÔ´²¿·Ö£©£¬µ«»¹ÓиüºÃµÄ½â¾ö°ì·¨£ºÄǾÍÊÇ×÷Ϊ Web ·þÎñÆ÷±¾ÉíÒ»²¿·ÖµÄ Java¡£ÕâÖÖ·þÎñÆ÷¶ËµÄ Java ³ÆΪ servlet¡£±¾ÎÄËùÌṩµÄ½â¾ö·½°¸½«ÊÇÒ»¸ö servlet£¬ÊÇ°´ÕÕ Java Servlet API ±àдµÄ -- ¾¡¹Üͨ¹ý CGI-bin ½Å±¾£¨Óà Perl¡¢Tcl¡¢Java »òÆäËûÓïÑÔ±àд£©Ò²ÄÜʵÏÖͬÑùµÄ½â¾ö·½°¸¡£

    Çë×¢Ò⣬¶Ô servlet ±à³ÌºÍ¹ÜÀíµÄ½éÉܲ»ÊôÓÚ±¾ÎĵÄÌÖÂÛ·¶Î§£»ÎÒÃǽöÌÖÂÛÓë POST ½â¾ö·½°¸ÓÐÖ±½Ó¹ØϵµÄÖ÷ÒªÎÊÌâ¡£

    PosterServlet ´úÂë°üº¬´óÁ¿µÄ×¢ÊÍ£¬ÒÔ±ãÖ¸µ¼ÄúÔĶÁ´úÂë¡£´úÂë°üº¬´óÁ¿µÄ´íÎó´¦ÀíºÍ¶îÍâ¼ì²é£¬ÓÃÀ´´¦Àí¹ý¶àµÄ¿ÉÄܳöÏÖµÄÎÊÌâ¡¢¾Ü¾ø·þÎñ¹¥»÷µÈ¡£µ«ÊǶàÊýʱºòÄú¿ÉÒÔºöÂÔÕâЩ´úÂë¡££¨ÉÔºóÎÒ»á¸üÉîÈëµØÌÖÂÛ°²È«ÐÔÎÊÌâ¡££©Õâ¸ö servlet ÊÇÕë¶Ô Java 1.1.x API ±àдµÄ£¨¶ø applet ´úÂëÊÇÕë¶Ô Java 1.0.2 ±àдµÄ£©¡£

    doPost() ·½·¨´¦Àí POST ÇëÇó -- ¼´£¬doPost() ¸ºÔðÇ°ÈýÖÖ·þÎñÆ÷Ö°Ôð£ºËü¸ù¾Ýͨ¹ý POST ·¢ËÍÀ´ÐÅÏ¢Éú³É HTML Îĵµ£¬È»ºó½«Îĵµ±£´æµ½Ò»¸öÁÙʱµÄ´ÅÅÌÎļþÖУ¬²¢½«Ä§Á¦¼ü·µ»Ø¸ø applet£¬Ä§Á¦¼üÓÃÀ´±êʶ HTML Îĵµ£¬²¢ÊʺÏÖ±½ÓǶÈëËæºóµÄ GET ÇëÇóÖС£

    ÏÂÃæÊÇ´úÂëµÄºËÐIJ¿·Ö¡££¨Òª²é¿´ÍêÕûµÄ´úÂ룬Çë²ÎÔÄʵ¼ÊµÄÔ´Îļþ¡££©ÊµÏÖ˵Ã÷£ºÄ§Á¦¼üʵ¼ÊÉÏÊÇΪ´ËÊÂÎñÉú³ÉµÄ HTML ÎĵµµÄÎļþÃû¡£ÎļþÃûÊÇʹÓà java.util.Random ÀàÉú³ÉµÄÒ»¸ö Long Öµ¡£ protected void doPost (HttpServletRequest request,
    HttpServletResponse response)
    throws ServletException, IOException
    {
    response.setContentType ("text/plain");

    // ¹¹½¨Êä³öÎļþÃû¡£
    String fileName = (new Long (randomizer.nextLong())).toString();
    File file = null;
    try
    {
    file = new File (posterTempDir + File.separator +
    fileName + posterTempExt);
    }
    catch (Exception e)
    {
    sendPostFailure (response,
    "Unable to build output file path!");
    return;
    }

    // ´ò¿ªÊä³öÎļþ¡£
    PrintWriter output = null;
    try
    {
    output = new PrintWriter
    ( new BufferedWriter
    ( new FileWriter (file)));
    }
    catch (IOException e)
    {
    sendPostFailure (response, "Unable to open output file!");
    return;
    }

    output.println ("<html>");
    output.print ("<head><title>Poster Servlet Generated Output");
    output.println ("</title></head>");
    output.println ("<body>");


    // ÏÖÔÚ,Ñ­»·¼ì²éÇëÇó±êÍ·²¢½«ËüÃÇдÈëÎļþÖС£
    String headerName = null;
    Enumeration headers = request.getHeaderNames();
    if (headers.hasMoreElements())
    {
    output.println ("<h1>CGI headers:</h1><hr>");
    output.println ("<ul>");
    while (headers.hasMoreElements())
    {
    headerName = (String) headers.nextElement();
    output.print ("<li><b>");
    output.print (headerName);
    output.print (" = ");
    output.print (request.getHeader (headerName));
    output.println ("</b></li><br>");
    }
    output.println ("</ul><hr><br>");
    }

    // ´¦Àí POST ÄÚÈÝ¡£
    if (0 < request.getContentLength())
    {
    String line = null;

    // ½«ËùÓÐÊäÈë×Ö½Úת»»Îª×Ö·û¡£
    BufferedReader in = new BufferedReader
    ( new InputStreamReader (request.getInputStream()));

    output.println ("<h1>POST contents:<h1><hr>");
    output.println ("<p><pre>");


    // ¶ÁÈ¡ÊäÈëµÄÿһÐУ¬²¢½«ÆäдÈëÊä³öÎļþÖС£
    HttpUtils httpUtils = new HttpUtils();
    try
    {
    while (null != (line = in.readLine()))
    {
    try
    {
    Hashtable data = httpUtils.parseQueryString (line);
    String keyName = null;
    Enumeration keys = data.keys();

    while (keys.hasMoreElements())
    {
    String[] values = null;

    keyName = (String) keys.nextElement();
    output.print (keyName);

    values = (String[]) data.get (keyName);

    output.print (" =");
    if (1 < values.length)
    output.println ("");
    for (int i = 0; i < values.length; i++)
    {
    output.print (" ");
    output.println (values[i]);
    }
    }
    output.println();
    }
    catch (IllegalArgumentException e)
    {
    output.print (line);
    }
    }
    }
    catch (IOException e)
    {
    output.println (" </pre><br><p><b>");
    output.println ("Unable to read entire POST contents!");
    output.println ("</b></p><br><pre> ");
    }

    output.println ("</pre></p><hr>");
    }

    // ÕûÀíÊä³öÎļþ¡£
    output.println ("</body></html>");
    output.flush();
    output.close();


    // ¹¹½¨ POST ÏìÓ¦¡£
    ServletOutputStream out = response.getOutputStream();
    out.println (fileName);
    out.println ("That is the magic value to return as a URL " +
    "parameter in a showDocument() call to " +
    "get the data generated by this POST call.");
    } // doPost() ·½·¨½áÊø¡£



    doGet() ·½·¨´¦Àí GET ÇëÇó¡£Ëü¸ºÔð´Ó GET ²éѯÖÐÌáȡħÁ¦¼ü£¬´ÓÏà¹ØµÄ´ÅÅÌÎļþ¼ÓÔØ HTML Îĵµ£¬È»ºó½« HTML Îĵµ·µ»Ø£º

    protected void doGet (HttpServletRequest request,
    HttpServletResponse response)
    throws ServletException, IOException
    {
    response.setContentType ("text/html");

    // »ñÈ¡ doPost() ·½·¨Îªµ÷ÓÃÕßÌṩµÄ±êʶ·û£¨Èç¹ûÓеĻ°£©¡£
    String fileName = request.getQueryString();


    // ¹¹½¨ÊäÈëÎļþÃû¡£
    File file = null;
    try
    {
    file = new File (posterTempDir + File.separator +
    fileName + posterTempExt);
    }
    catch (Exception e)
    {
    sendGetFailure (response,
    "Unable to get data file. Please start over!");
    return;
    }


    // ´ò¿ªÎļþ¡£
    BufferedReader input = null;
    try
    {
    input = new BufferedReader ( new FileReader (file));
    }
    catch (FileNotFoundException e)
    {
    sendGetFailure (response,
    "Unable to find data file. Please start over!");
    return;
    }


    // ¶ÁÈë²¢·¢ËÍÊý¾ÝÎļþ¡£
    ServletOutputStream out = response.getOutputStream();
    String line = null;
    try
    {
    while (null != (line = input.readLine()))
    {
    out.println (line);
    }
    }
    catch (IOException e)
    {
    out.println (" <br><p><b>");
    out.println ("Unable to read entire data file contents!");
    out.println ("</b></p><br> ");
    }

    // ¹Ø±Õ²¢É¾³ýÊäÈëÎļþ¡£
    input.close();
    try
    {
    if (!file.delete())
    {
    // ¼Ç¼´íÎóÒÔ±ãϵͳ¹ÜÀíÔ±´¦Àí¡£
    }
    }
    catch (SecurityException e)
    {
    }
    } // doGet() ·½·¨½áÊø¡£



    ×îºóÖµµÃÒ»ÌáµÄһС¶Î´úÂëÊÇ init() ·½·¨¡£Ëü³õʼ»¯Ò»Ð©È«¾ÖÊý¾Ý£¬²¢É¾³ýÉÐδÓà clearTempDir() ·½·¨ÉùÃ÷µÄÁÙʱÎļþ¡£ÓйØÕâÁ½¸ö·½·¨µÄ¶¨Ò壬Çë²é¿´Ô´Îļþ£¨¹ØÓÚÄÇÁ½ÖÖ·½·¨ÒÑûʲôֵµÃÔÚ´Ë´¦ËµÃ÷µÄÁË :-)£©¡£Çë×¢Ò⣬һÖÖ¸üÎȽ¡¡¢¸ü°²È«µÄ½â¾ö·½°¸½«»áÏÞÖÆÁÙʱÎļþµÄÓÐЧʱ¼ä£¬²¢ÏÞÖÆÔÚÈκθø¶¨Ê±¼äÄÚÓÐЧµÄÎļþ×ÜÊý¡£Ìí¼ÓһЩÂß¼­À´´¦ÀíÆäËü×ÊÔ´±¥ºÍÎÊÌâÒ²ÊÇÃ÷ÖÇÖ®¾Ù¡£

    ̸µ½°²È«ÐÔºÍÎȽ¡ÐÔ£¬Ò쳣ƫִµÄÈË¿ÉÄÜÏëµÃµ½¸ü¶à£¬àÅ£¬Æ«Ö´¿ñ¡£Ê¹Óà SSL£¨¼ÓÃÜÌ×½Ó×ÖЭÒé²ã£©»òÊÇÆäËû¼ÓÃܽâ¾ö·½°¸ÎÞÒÉ»áÌá¸ßÕûÌ尲ȫÐÔ¡£

    ºÃÁË£¬ÄúÒѾ­Ñ§»áÁËͨ¹ý Java Ö´ÐÐ POST ²Ù×÷¡£ÎÒÃÇÒÑÓë·þÎñÆ÷¹²Ä±£¬Ê¹µÃÈÃä¯ÀÀÆ÷ÏÔʾ POST µÄ½á¹û³ÉΪ¿ÉÄÜ¡£

    ×÷Õß¼ò½é
    john.mitchell
    John ÏȺó×ö¹ý¹ÍÔ±¡¢×ÉѯÈËÔ±£¬ÏÖÔÚÊÇ×Ô¼º¹«Ë¾µÄÀÏ°å¡£¹ýȥʮÄêÖÐËûËùͶ×ʵÄÁìÓò°üÀ¨Ç°ÑؼÆËã»úÈí¼þµÄ¿ª·¢¡¢¶ÔÆäËû¿ª·¢ÈËÔ±Ìṩ½¨ÒéµÈ¡£John ÊÇ Making Sense of Java: A Guide for Managers and the Rest of Us ºÍ Dummies 101: Java Programming Á½±¾ÊéµÄµÄ×÷ÕßÖ®Ò»£¬²¢ÔÚ±à³ÌÔÓÖ¾ÉÏ·¢±íÁËÐí¶àÎÄÕ¡£³ýÁËΪ JavaWorld ׫д Java Tips & Tricks רÀ¸Ö®Í⣬Ëû»¹Ö÷³Ö×Å comp.lang.tcl.announce ºÍ comp.binaries.geos ÐÂÎÅ×â¡£

    ²Î¿¼×ÊÔ´

    PosterServlet.java http://www.javaworld.com/javatips/javatip41/PosterServlet.java
    Java Tip #34 http://www.javaworld.com/javatips/jw-javatip34.html
    ÍòάÍøÁªÃ赀 Java web ·þÎñÆ÷£¬Jigsaw http://www.w3.org/Jigsaw/
    JavaSoft µÄ Java Web Server http://jserv.javasoft.com/index.html
    Using Java for CGI-bin scripting http://www.javaworld.com/jw-01-1997/jw-01-cgiscripts.html




    ·¢²¼ÈË:netbull À´×Ô:DevelopWork