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 technology web technology
  1. WL_HOME/common/weblogic.jar

  2. WL_HOME/common/admin.jar

  3. WL_HOME/server/lib/admin.jar

  4. WL_HOME/server/lib/weblogic.jar

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

The weblogic.Admin utility requires weblogic.jar in the classpath, which is located at WL_HOME/server/lib/weblogic.jar. This JAR contains the administration classes and necessary dependencies.

Multiple choice technology testing
  1. JMS

  2. JDBC

  3. RMI

  4. CPD2

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

JDBC (Java Database Connectivity) is the standard Java API for connecting to and executing queries on databases. In Rogers IVR architecture, the middleware business layer uses JDBC to access CPD2 (a database system). JMS is for messaging, RMI is for remote method invocation between Java objects, and CPD2 is the target database name - not an access method. JDBC is the correct Java-to-database bridge.

Multiple choice technology testing
  1. JMS

  2. JDBC

  3. RMI

  4. CPD2

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

JMS (Java Message Service) is the standard Java API for messaging using MQ (Message Queue) infrastructure. The middleware business layer uses JMS to communicate with the Supersystem through MQ queues. JDBC is for database connectivity, RMI for remote method invocation, and CPD2 appears to be a database name, not a communication protocol.

Multiple choice technology web technology
  1. True

  2. False

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

Spring Framework is designed to enable POJO (Plain Old Java Object) programming. Unlike earlier J2EE frameworks requiring special interfaces or inheritance, Spring allows you to work with simple Java classes. This promotes testability and loose coupling without being tied to framework-specific APIs.

Multiple choice technology web technology
  1. Light Weight

  2. IOC

  3. Bean Factory

  4. AOP

  5. MVC Framework

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

Spring Framework features include being lightweight, Inversion of Control (IoC) container, Aspect-Oriented Programming (AOP), and MVC Framework. Bean Factory is actually PART of Spring's IoC container, not a separate top-level feature - it's the implementation of IoC. The question marks Bean Factory as incorrect, which is accurate since it's included within IoC.

Multiple choice technology web technology
  1. AOP

  2. IOC

  3. Container

  4. MVC Framework

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

Loose coupling in Spring is achieved through Inversion of Control (IoC). The IoC container manages object creation and dependency injection, allowing objects to remain decoupled from their dependencies. AOP handles cross-cutting concerns. Container is the mechanism, not the principle. MVC is for web layer.

Multiple choice technology web technology
  1. Interface Injection

  2. Getter Injection

  3. Constructor Injection

  4. Destructor Injection

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

Constructor Injection is a core dependency injection type supported by Spring Framework. Interface Injection, Getter Injection, and Destructor Injection are not standard injection methods in Spring.

Multiple choice technology web technology
  1. IOC

  2. Container

  3. AOP

  4. MVC Framework

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

The Spring Container (specifically the ApplicationContext or BeanFactory) is responsible for managing the life cycle and configuration of application objects (beans). IoC (Inversion of Control) is the underlying design pattern, not the concrete framework feature.

Multiple choice technology web technology
  1. Spring Context

  2. Core Container

  3. Spring AOP

  4. Spring DAO

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

Spring Context (or Spring ApplicationContext) indeed includes enterprise services like JNDI, EJB, email, internationalization, validation, and scheduling. Core Container manages beans, AOP handles aspects, and DAO provides database abstraction.

Multiple choice technology web technology
  1. setType

  2. setContent

  3. setContentType

  4. setResponseContentType

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

The HttpServletResponse class provides the setContentType(String) method to specify the MIME type of the response content. This tells the browser how to interpret the returned data (e.g., text/html, application/json).

Multiple choice technology web technology

A user types the URL http://www.javaprepare.com/scwd/index.html . Which HTTP request gets generated. Select the one correct answer.

  1. GET method

  2. PUT method

  3. POST method

  4. HEAD method

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

To understand the type of HTTP request generated, the user needs to know the following:

  • HTTP request methods
  • The structure of a URL

The HTTP request method indicates the type of action the client wants the server to perform on a resource. The structure of a URL is made up of several parts, including the protocol, domain name, and path.

When a user types the URL http://www.javaprepare.com/scwd/index.html:

Based on this information, the correct answer is:

The Answer is: A (GET method)

The GET method is used to request a representation of the specified resource. In this case, the user is requesting the resource located at http://www.javaprepare.com/scwd/index.html by typing the URL into their web browser. As a result, a GET method HTTP request is generated to retrieve the resource.