Java and CGI communication

Source: Internet
Author: User

Java programs can send a CGI request to a server, which is no different from an HTML form page. And like an HTML page, this request can be set to either get (download) or post (upload). In addition, Java programs can intercept the output of CGI programs, so there is no need to rely on programs to format a new page, or to force users to turn from one page to another when there is an error. In fact, the appearance of the program can be done with the previous version identical.

The code is simpler too, and it's not hard to write with CGI (if you really understand it). So in this section, we're going to do a crash course in CGI programming. To solve the general problem, some CGI tools will be created in C + + so we can write a CGI program that solves all the problems. The advantage of this is that the porting capability is particularly strong-the example that will be seen is running on any system that supports CGI, and there is no firewall problem.

This example also illustrates how to establish a connection between a program piece (applet) and a CGI program to easily adapt it to its own project.

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.