When the internet/web was young... there was the webserver. But it didn't do much except fulfill requests for files. Mostly images and .html documents, and such.
However, someone noticed that a C program has stdin, stdout and stderr streams... So they made a file extension called .cgi (Common Gateway Interface) and told the webserver that when a request was made to this .cgi file... that it shouldn't SEND a .cgi file to the requestor... instead it should RUN the file as a program, get the program's output and sent THAT output to the browser.
Thus web apps were born.
Browser Request -> Webserver -> Stdin -> C program... ->>>
Stdout -> Webserver -> Response to user's browser.
Sun Microsystems wanted to use java for web apps. So, they made tiny classes called "Servlets" (mini-Server programs) to run instead of the C programs/Perl programs everyone else was using.
Servlets work like:
Browser Request -> Webserver -> Java -> Stdin -> java Servlet Class.. ->>>
Stdout -> Webserver -> Response to user's browser.
That's pretty much is. A Java Servlet is a program that accepts data, does some processing and then spits out results that a webbrowser would understand.
Hope this answers your question.
Chat with our AI personalities
Yes!Visual Java plus plus and Java Builder is different from the Java language?
There are several types of Java technology. Some examples of Java software are Java ME, Java EE, Java SE, and Java Card. Java made the JAVA development kit for those that develop in Java. There is also Java Virtual machine and some class libraries. Java is also famous for its languages like Clojure, Beanshell, Groovy, Gosu, Rhino, Kotlin, JRuby, Scala, and Jython.
Java applets
The supermost package of Java is the "java" package.
Well you get java as java and javascript as iava.