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
-
Server Log
-
WebLogic Console
-
Version.txt
-
weblogic.Admin utility
C
Correct answer
Explanation
Version.txt is NOT a valid method for determining WebLogic server version. Valid methods include checking the Server Log, using the WebLogic Console, or running the weblogic.Admin utility with VERSION command.
-
WL_HOME/common/weblogic.jar
-
WL_HOME/common/admin.jar
-
WL_HOME/server/lib/admin.jar
-
WL_HOME/server/lib/weblogic.jar
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.
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.
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.
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.
-
Light Weight
-
IOC
-
Bean Factory
-
AOP
-
MVC Framework
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.
-
AOP
-
IOC
-
Container
-
MVC Framework
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.
-
Interface Injection
-
Getter Injection
-
Constructor Injection
-
Destructor Injection
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.
-
IOC
-
Container
-
AOP
-
MVC Framework
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.
-
Spring Context
-
Core Container
-
Spring AOP
-
Spring DAO
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.
-
Core Container
-
Bean Factory
-
Spring ORM
-
Spring MVC Framework
A,C,D
Correct answer
Explanation
Core Container, Spring ORM, and Spring MVC Framework are all Spring modules. Bean Factory is a component within Core Container, not a separate module itself.
-
SessionContext
-
SessionConfig
-
HttpServletRequest
-
HttpServletResponse
C
Correct answer
Explanation
The HttpServletRequest interface provides the getSession() method to retrieve the HttpSession object. This is part of the Java Servlet API for session management in web applications.
-
setType
-
setContent
-
setContentType
-
setResponseContentType
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).
-
GET method
-
PUT method
-
POST method
-
HEAD method
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.
-
Servlet
-
ServletConfig
-
Serializable
-
ServletContext
D
Correct answer
Explanation
GenericServlet implements Servlet, ServletConfig, and Serializable interfaces, but does NOT implement ServletContext. The ServletContext is obtained through the ServletConfig.getServletContext() method, not directly implemented by the servlet.