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 web technology
  1. Naming Lookup

  2. JNDI

  3. Class loader

  4. Buffering

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

JNDI (Java Naming and Directory Interface) is the API and service that Tomcat uses to provide access to resources like databases, connection pools, and JavaMail sessions through a naming context. Naming Lookup is too vague, Class Loader is for Java classes, and Buffering is for I/O operations.

Multiple choice technology web technology
  1. Common Gateway Interface

  2. CORBA

  3. IIS Server

  4. Java Servlets

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

CGI (Common Gateway Interface) is the standard protocol for web servers to execute external programs that generate web content dynamically, typically processing form data. CORBA is for distributed objects, IIS Server is a Microsoft web server product, and Java Servlets are Java-based server-side programs (not external programs in the CGI sense).

Multiple choice technology web technology
  1. CATALINA_HOME/webapps/admin.html

  2. CATALINA_HOME/webapps/admin.xml

  3. CATALINA_BASE/webapps/admin.xml

  4. CATALINA_BASE/webapps/admin.html

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

The Admin web application is configured through an XML descriptor file located at CATALINA_BASE/webapps/admin.xml. This follows the standard Tomcat deployment descriptor pattern where configuration is in XML files, not HTML files. The CATALINA_BASE path is used for instance-specific configurations.

Multiple choice technology web technology
  1. Admin Application

  2. WebDAV Application

  3. Manager Application

  4. Examples application

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

The WebDAV (Web Distributed Authoring and Versioning) application in Tomcat enables remote content management through WebDAV clients, allowing users to edit and manage website files as if they were local. Admin and Manager apps are for server administration, and Examples is for demonstration code.

Multiple choice technology web technology
  1. Reverse proxy and content-based routing

  2. Dynamic content caching and integration with servlet caching

  3. File serving enabler

  4. HTTP compression

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

Caching Proxy server provides reverse proxy capabilities for content-based routing and dynamic content caching integrated with servlet caching. These are core caching proxy features. File serving (C) and HTTP compression (D) are typically separate WebSphere Edge components or server features, not primary caching proxy functions.

Multiple choice technology web technology
  1. An embedded portlet container

  2. A scaled-down version of the WebSphere Portal Server

  3. Several J2EE applications that render and aggregate portlets in a browser

  4. An embedded version of WebSphere Portal Express

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

WebSphere application server provides an embedded portlet container to support JSR 168 compliant portlets without requiring a separate portal server. This container manages portlet lifecycle, rendering, and aggregation. Option B is incorrect (no scaled-down portal). Option C describes a portal application, not the container. Option D is incorrect (Portal Express is a separate product).

Multiple choice technology web technology
  1. Security, JMS messaging, Naming and HTTP Plug-in

  2. The user registry, Naming and HTTP Plug-in

  3. HTTP Load Balancing service, JMS messaging and Data Replication Service (DRS)

  4. Security, Naming, Transaction and Dynamic Cache

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

WebSphere Application Server provides core infrastructure services including security (authentication/authorization), JNDI naming service for resource lookup, transaction management for distributed operations, and dynamic caching for performance. JMS messaging is available but not the primary focus in this grouping. User registry and HTTP Load Balancing are infrastructure components but not listed in the correct combination.

Multiple choice technology web technology
  1. SAR

  2. WAR

  3. JAR

  4. EJB-JAR

  5. SIP-JAR

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

Session Initiation Protocol (SIP) servlets are packaged in SIP Archive (SAR) files, which are specialized archives for SIP applications. Standard web applications use WAR files, plain Java classes use JAR files, and enterprise beans use EJB-JAR files. SIP-JAR is not a standard archive type.

Multiple choice technology web technology
  1. Deployment Manager

  2. Web container

  3. EJB container

  4. HTTP Server

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

To answer this question, the user needs to have a basic understanding of WebSphere cell configuration and its components.

The correct answer is:

A. Deployment Manager

Explanation:

In a WebSphere cell configuration, the Deployment Manager is a single point of failure. The Deployment Manager is responsible for managing the deployment of applications across the cell, and if it fails, it can result in the entire cell being unavailable. The other components, such as the web container, EJB container, and HTTP server, can be distributed across multiple nodes in the cell, providing redundancy and fault tolerance.

Option B, web container, is incorrect because it is responsible for handling HTTP requests and is not a single point of failure.

Option C, EJB container, is incorrect because it manages the execution of EJB components and is not a single point of failure.

Option D, HTTP server, is incorrect because it is responsible for handling HTTP requests and can be distributed across multiple nodes in the cell.

Therefore, the correct answer is A. Deployment Manager.

Multiple choice technology web technology
  1. Cookies

  2. URL Rewriting

  3. Security Integration

  4. Serial Access

  5. RMI

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

When SSL ID tracking is enabled, Cookies and URL Rewriting should also be enabled as fallback mechanisms. SSL tracking can fail if clients don't support SSL sessions or if sessions are invalidated, so cookies provide primary persistence and URL rewriting ensures session continuity when cookies are disabled. Security Integration, Serial Access, and RMI are not session tracking mechanisms.

Multiple choice technology web technology
  1. Overriding the populate method in ActionForm

  2. Override the processPopulate method of the RequestProcessor

  3. Override the populateBean method of the ActionMapping

  4. None of the above

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

In Struts 1.1, the RequestProcessor's processPopulate method is the correct override point to control how form fields are populated from request parameters. Overriding ActionForm.populate is not the intended extension mechanism, and ActionMapping doesn't have a populateBean method.

Multiple choice technology web technology
  1. One per application

  2. One per request

  3. One per module

  4. One per Action Servlet

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

In Struts, there is exactly one RequestProcessor instance per module, which handles all requests for that module. This is a singleton pattern within each module context. It's not one-per-application (multiple modules exist), not one-per-request (too expensive), and not one-per-ActionServlet (the module is the key).

Multiple choice technology web technology
  1. Intercepting Filter

  2. Front Controller

  3. Single Controller

  4. None of the above

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

The Struts 1 ActionServlet implements the Front Controller design pattern, where a single servlet receives all requests and delegates to appropriate handlers (Actions). Intercepting Filter is a different pattern (J2EE filters), Single Controller is not a standard pattern name, and Front Controller is the correct answer.

Multiple choice technology web technology
  1. Globals.LOCALE_ID

  2. Commons.LOCALE_ID

  3. Globals.LOCALE_KEY

  4. Constants.LOCALE_KEY

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

In Struts 1.2, the locale information is stored in session with the key Globals.LOCALE_KEY. The constant value is "org.apache.struts.action.LOCALE". This locale is automatically set by Struts based on the user's browser preferences or can be manually set. Option A uses ID instead of KEY which is incorrect. Option B incorrectly uses Commons prefix. Option D incorrectly uses Constants prefix.