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 technology programming languages
  1. Home Interface

  2. Remote Interface

  3. Bean Class

  4. All of the above

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

Stateful Session Beans consist of three components: the Home Interface (for creating/finding beans), the Remote Interface (business methods), and the Bean Class (implementation). All three are required.

Multiple choice technology programming languages
  1. getServletInfo()

  2. getInitParameters()

  3. getServletConfig()

  4. None of the above

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

In the Servlet init(ServletConfig) method, the getServletConfig() method is used to retrieve the ServletConfig object for accessing initialization parameters. getServletInfo() returns servlet info, and getInitParameters() is not a standard method.

Multiple choice technology programming languages
  1. null

  2. Primary Key class

  3. Home Object

  4. Remote Object

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

In EJB Container-Managed Persistence (CMP), the ejbCreate() method must return null (or the primary key type, but per the EJB specification, the container manages primary key generation/mapping and CMP bean's ejbCreate() returns null so the container can initialize the primary key). The Home Object and Remote Object are client-side references, not returned by bean lifecycle methods.

Multiple choice technology programming languages
  1. The Session is not valid in the new Window

  2. The Session is valid in the new Window

  3. New session is created and that is valid.

  4. None of the above

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

When a new window is opened via JavaScript from a JSP page, session cookies are passed to the new window if it's within the same domain. This means the existing HTTP session remains valid and accessible in the new window. Option A is incorrect because sessions do persist across window opens. Option C is incorrect because a new session is not automatically created.

Multiple choice technology programming languages
  1. init(),service(),destroy()

  2. init(),destroy(),service(),

  3. init(),process(),destroy()

  4. init(),start(),destroy()

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

The servlet lifecycle follows init() for initialization, service() for processing requests, and destroy() for cleanup. The service() method is called repeatedly for each request until the servlet is destroyed.

Multiple choice technology programming languages
  1. Request Tracking

  2. Session tracking

  3. Process Tracking

  4. All the above

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

Session tracking is the mechanism servlets use to maintain state information about a series of requests from the same user across multiple HTTP connections, which are otherwise stateless.

Multiple choice technology programming languages
  1. JSP

  2. Controller

  3. Java classes

  4. XML

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

In J2EE MVC architecture, the Model represents business logic and data, typically implemented as Java classes (EJBs or POJOs). The Model handles data access, business rules, and application state, independent of the View or Controller.

Multiple choice technology programming languages
  1. JSP

  2. Controller

  3. Java classes

  4. XML

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

In J2EE MVC architecture, the View handles presentation and user interface, typically implemented as JSP (JavaServer Pages). JSPs combine HTML with Java code to dynamically generate web pages for display.

Multiple choice technology programming languages
  1. Applets

  2. Application Clients

  3. Wireless Clients

  4. All the above

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

J2EE supports multiple client types: Applets (browser-based Java clients), Application Clients (standalone desktop apps), and Wireless Clients (mobile devices). All three are valid J2EE client categories.

Multiple choice technology programming languages
  1. JSP files

  2. Java classes &gif and html file

  3. web component deployment descriptors

  4. All the above

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

A Java EE/Jakarta EE web module contains web components such as JSP files, static resources (HTML, GIF), Java classes (servlets/beans), and deployment descriptors (web.xml). Therefore, all the listed components are correct.