Send data from a Java program to CGI program

Explain how to send data from my Java program to a CGI program.

There are two methods of sending data from Java program to a CGI Program:

a.) The first method is that we can use CGI scripting on both client and server by using Java.

The client-side part covers using GET and POST from applets to talk to CGI programs. The server-side part covers implementing CGI programs in Java that handle GET and POST (regardless of whether the client uses HTML forms or applets), and also includes a URL decoder and CGI form parser in Java.

b.) The second method is by using Servlets and JSP.

Servlets are Java technology's answer to CGI programming. They are programs that run on a Web server and build Web pages. Java servlets are more efficient, easier to use, more powerful, more portable, and cheaper than traditional CGI and than many alternative CGI-like technologies.

Java Server Pages (JSP) is a technology that lets you mix regular, static HTML with dynamically-generated HTML. Many Web pages that are built by CGI programs are mostly static, with the dynamic part limited to a few small locations.
Purpose of the executable files
Java - purpose of the executable files - java_g is a non-optimized version of java suitable for use with debuggers like jdb. When using java_g to run a program that loads a shared library...
URL instance vs. URLConnection instance
URLConnection is a class under package. The abstract class URLConnection is the superclass of all classes that represent...
How do I read a line of input at a time in Java?
The standard input stream is represented by the InputStream object For reading a whole line at a time BufferedReader is chained to an InputStreamReader...
Post your comment