ITPEC FE Morning October 2018 Question 9
In a web environment, which of the following is the name of a program that runs on a web server and achieves dynamic processing?
Explanation
Java servlet — a Java program that runs on the web server and builds dynamic responses to HTTP requests.
A servlet runs inside a servlet container on the web server, such as Tomcat. For each request it can read form data, query a database and generate an HTML page; the browser receives only the result, and no part of the servlet runs on the client.
Answer (b)
Why not others:
- •(a) Java applet — a Java program downloaded into the browser and run there: the client-side counterpart of a servlet
- •(c) JavaScript — runs mainly in the browser, on the client side; it can also run on a server, but it is not limited to one
- •(d) VBScript — mainly a client-side script language for Internet Explorer; it also ran in classic ASP pages, so it is not server-only either
Key rule: The suffix tells the side: an applet runs in the browser, a servlet on the server.
Algorithm and Programming · AI-written, may contain errors
This question comes from an official ITPEC past paper. ITPEC Practice is an independent study tool and is not affiliated with ITPEC. See the official FE past-paper collection or Report an issue.