Computer Knowledge

Java Enterprise and Web Technologies

2,183 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.