answersLogoWhite

0

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.

User Avatar

Wiki User

16y ago

Still curious? Ask our experts.

Chat with our AI personalities

RossRoss
Every question is just a happy little opportunity.
Chat with Ross
JudyJudy
Simplicity is my specialty.
Chat with Judy
LaoLao
The path is yours to walk; I am only here to hold up a mirror.
Chat with Lao

Add your answer:

Earn +20 pts
Q: What are java servelets?
Write your answer...
Submit
Still have questions?
magnify glass
imp