ITPEC FE Morning April 2023 Question 10
Which of the following is a program that achieves dynamic processing in a web environment and operates only on a web server?
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 (c)
Why not others:
- •(a) JavaScript — runs mainly in the browser, on the client side; it can also run on a server, but it is not limited to one
- •(b) Java applet — a Java program downloaded into the browser and run there: the client-side counterpart of a servlet
- •(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.