Computer Knowledge

Java Enterprise and Web Technologies

2,279 Questions

Java enterprise and web technologies questions focus on J2EE architecture, web services like SOAP, and servlet functionalities. These topics frequently appear in IT officer and specialist scale examinations. Regular practice ensures familiarity with enterprise application components.

HttpServlet methodsSOAP and web servicesEJB architecture rolesJ2EE componentsJSP servlet callingUDDI concepts

Java Enterprise and Web Technologies Questions

Multiple choice
  1. There are no public instance variables.

  2. All persistent values are accessed using getxxx and setxxx methods.

  3. It may have many constructors as necessary.

  4. All of the above are true of a Java bean.

Reveal answer Fill a bubble to check yourself
C Correct answer
Explanation

Java Beans must have a no-argument constructor, public getter/setter methods following naming conventions (getXxx, setXxx, isXxx for boolean), and no public instance variables. Having many constructors is NOT standard for Java Beans - they specifically require a no-arg constructor for instantiation by reflection/tools.

Multiple choice
  1. A Java application

  2. A Java applet

  3. A Java servlet

  4. None of these

Reveal answer Fill a bubble to check yourself
C Correct answer
Explanation

A Java servlet is a server-side Java program that runs on a web server and handles HTTP requests from web browsers, generating dynamic responses. Unlike applets (client-side) or applications (standalone), servlets are specifically designed to respond to HTTP requests within a web container.

Multiple choice
  1. Rmi

  2. Corba

  3. Jdbc

  4. Servlet

Reveal answer Fill a bubble to check yourself
D Correct answer
Explanation

Both HttpServlet (for HTTP-specific web applications) and GenericServlet (for protocol-independent servlets) implement the Servlet interface, which defines the core servlet lifecycle methods like init(), service(), and destroy(). The Servlet interface is the foundation of all servlet technology.

Multiple choice
  1. init, start, stop

  2. init, begin, stop, destroy

  3. init, service, destroy

  4. none of these

Reveal answer Fill a bubble to check yourself
C Correct answer
Explanation

The Servlet lifecycle has three key methods: init() called once when servlet is first loaded, service() called for each request to handle the actual processing, and destroy() called once when servlet is unloaded. There is no start() or begin() method in the servlet API.

Multiple choice
  1. A waiting client when the server crashes after carrying out the request, but before sending the reply

  2. A running server with no waiting parent.

  3. A lost message

  4. An unacknowledged message

  5. A duplicate message

Reveal answer Fill a bubble to check yourself
B Correct answer
Explanation

When a client crashes after starting a RPC , the server whose process continues to run is called an orphan and causes wastage of CPU cycles and other resources.

Multiple choice
  1. This interface is used to read data from a client request.

  2. This interface is used to write data from a client request.

  3. This interface is used to declare the life cycle method of the servlet.

  4. This interface is used to provide access information and the log events to the servlet in its environment.

  5. This interface is used to initialize the parameters to the servlet.

Reveal answer Fill a bubble to check yourself
E Correct answer
Explanation

Yes, this is the role of ServletConfig interface.

Multiple choice
  1. Applet is a program embedded in the web page.

  2. Applet has less response time.

  3. Applet can run under many platforms Linux, Windows, Mac, etc.

  4. All of the above.

  5. Only (1) and (3) are true.

Reveal answer Fill a bubble to check yourself
D Correct answer
Explanation

Yes, all of the above three are true statements about applet.