COMPILER DESIGN

ADVANCED TOPICS IN COMPILER DESIGN

CODE GENERATION FOR OBJECT ORIENTED LANGUAGES

Question [CLICK ON ANY CHOICE TO KNOW THE RIGHT ANSWER]
A java program that is hosted and run on a web server rather than launched from a browser
A
Web service
B
Servlet
C
JavaBean
D
Analyze the requirements
Explanation: 

Detailed explanation-1: -A servlet is a Java program that runs in a Web server, as opposed to an applet that runs in a client browser. Typically, the servlet takes an HTTP request from a browser, generates dynamic content (such as by querying a database), and provides an HTTP response back to the browser.

Detailed explanation-2: -A Java Servlet is a server-side component that runs on the webserver and extends the capabilities of a server. The above statement is TRUE.

Detailed explanation-3: -The servlet container (i.e. web server) calls the service() method to handle requests coming from the client( browsers) and to write the formatted response back to the client. Each time the server receives a request for a servlet, the server spawns a new thread and calls service.

Detailed explanation-4: -A servlet is a JavaTM component that can be plugged into a Java-enabled web server to provide custom services.

There is 1 question to complete.