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. a. TransactionalTestExecutionListener class

  2. b. AbstractTransactionalSpringContextTests class

  3. c. TestExecutionListener class

  4. d. AbstractTestExecutionListener class

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

TransactionalTestExecutionListener is a TestExecutionListener implementation in Spring's TestContext framework that provides transaction management for integration tests, including automatic transaction rollback after each test.

Multiple choice technology web technology
  1. a.) 1, 3 & 4 only

  2. b.) 1, 2 & 4 only

  3. c.) 3, 4 & 5 only

  4. d.) 1, 3 & 5 only

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

ApplicationContext capabilities include: 1) loading file resources (via ResourceLoader), 2) internationalization via MessageSource interface, 3) event publishing to registered listeners, and 4) ORM integration. Option B (1, 2, 4) is correct - declarative transactions (5) require AbstractApplicationContext, not base ApplicationContext.

Multiple choice technology architecture
  1. a) CORBA

  2. b) Web Service

  3. c) TEST

  4. d) DCOMM

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

SOA is an architectural pattern, not a specific technology. It can be implemented using various technologies including CORBA (Common Object Request Broker Architecture) and Web Services. Both provide mechanisms for services to communicate in a loosely coupled manner.

Multiple choice technology architecture
  1. a) CORBA

  2. b) Web Service

  3. c) TEST

  4. d) DCOMM

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

SOA can be implemented using CORBA (Common Object Request Broker Architecture) for distributed objects and Web Services for standardized XML-based communication. TEST and DCOMM are not recognized SOA implementation technologies.

Multiple choice technology web technology
  1. j_login

  2. j_get_user

  3. j_login_check

  4. j_get_security

  5. j_security_check

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

In Java EE form-based authentication, the login form must POST to j_security_check. This is a built-in servlet container endpoint that receives j_username and j_username parameters, authenticates the user against the realm, and redirects to the protected resource or error page. The other options (j_login, j_get_user, j_login_check, j_get_security) are not standard container-managed authentication endpoints.

Multiple choice technology web technology
  1. <realm-name>

  2. <auth-method>

  3. <security-role>

  4. <transport-guarantee>

  5. <web-resource-collection>

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

The element is required in a because it defines which resources (URL patterns) are being protected. The other elements ( goes in , goes in , is a separate top-level element, goes in ) serve different purposes or are in different sections of the deployment descriptor.

Multiple choice technology web technology
  1. An error occurs during page translation

  2. Translation is successful, but nothing is included in the response.

  3. Both "10 x 5 = 50" and "2 * 3 = 6" are included in the JSP response

  4. The text "10 x 5 = 50" is included in the JSP response, but "2 * 3 = 6" is NOT

  5. The text "2 * 3 = 6" is included in the JSP response, but "10 x 5 = 50" is NOT

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

When is false, both scripting expressions (<%= ... %>) and EL expressions (${ ... }) are allowed. Therefore, the JSP will successfully translate and execute both '10 x 5 = 50' (using EL) and '2 * 3 = 6' (using scripting expression). Setting it to true would disable scripting elements but not EL.

Multiple choice technology web technology
  1. in an online exchange between several open source developers

  2. over a long holiday weekend

  3. as a commercial package

  4. none

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

According to Struts history, the framework was first developed over a long holiday weekend by Craig R. McClanahan. This is the well-known origin story of the Apache Struts framework.

Multiple choice technology web technology
  1. Bypass calls to the ActionForm validate method

  2. Bypass validation of the Struts configuration file

  3. Generate an error message if an unknown message key is used

  4. none

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

The validating init-param of ActionServlet, when set to false, bypasses validation of the Struts configuration file (struts-config.xml). It does not affect ActionForm validation.

Multiple choice technology web technology
  1. Use an asterisk for the path property

  2. Set the "default" property of the mapping to "true"

  3. Set the "unknown" property of the mapping to "true"

  4. Set the "missing" init-param of the ActionServlet to the mapping's path

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

To specify a default ActionMapping for unmatched requests, you set the unknown property to true. This creates a catch-all mapping that handles any request path not explicitly defined.

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

  2. Overriding the processPopulate method of the Request Processor

  3. Overriding the populateBean method of the ActionMapping

  4. None

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

In Struts 1.1, the RequestProcessor class contains the processPopulate method that handles form population. Overriding this method allows customization of how request parameters populate ActionForm beans. ActionForm does not have a populate method, and ActionMapping is not involved in population.