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
-
a. XSL
-
b. xxxFactory.java
-
c.xxxAction.java
-
d.JSP
-
e. xxxDTO.java
A,C,D
Correct answer
Explanation
In portal layer architecture: XSL handles presentation transformation, JSP is for view rendering, and Action classes (xxxAction.java) handle request processing. Factory classes are typically in lower layers (business/DAO), and DTOs are data transfer objects used across layers but not portal-layer-specific.
-
EJB
-
POJO
-
Webservices
-
Webproject
B
Correct answer
Explanation
BSI services in BIB2 are developed as POJOs (Plain Old Java Objects), not as EJBs (which are heavier) or web services/web projects. POJOs are simpler Java objects without enterprise framework dependencies.
C
Correct answer
Explanation
This appears to be organization-specific configuration for an investment banking ('IB') WebSphere deployment. Standard WebSphere can support any number of nodes per server, but this question tests a specific deployment setup where 4 nodes per instance is the configured standard. This is environment-specific knowledge, not general WebSphere architecture.
-
Struts
-
Spring MVC
-
Standard JSP, Servle
-
WebWork
-
Spring IOC constrcutor injection is used
-
Spring IOC setter injection is used
-
Spring IOC interface injection is used
-
Spring IOC interface injection is not used
-
web.xml
-
application.properties
-
server.xml
-
.xml
C
Correct answer
Explanation
In traditional Java EE/Tomcat applications, datasources are commonly configured in server.xml using JNDI resources. Web.xml configures web application settings, while application.properties is a Spring Boot convention for configuration.
B
Correct answer
Explanation
Quartz is a Java job scheduling library that uses cron expressions for defining job execution schedules. JSTL is for JSP templating, iBatis is for database mapping, and AOP is aspect-oriented programming - none use cron expressions.
B
Correct answer
Explanation
Spring Framework beans should generally avoid class-level variables (other than static final constants or loggers) because they can cause thread-safety issues. Spring beans are typically singletons, and mutable instance variables can lead to race conditions in multi-threaded environments.
-
ActionServlet
-
ActionJsp
-
ActionClass
-
Action
A
Correct answer
Explanation
ActionServlet is the core controller class in Struts Framework - it serves as the front controller that receives all HTTP requests and routes them to appropriate Action classes. ActionServlet is responsible for initializing the framework, populating configuration from struts-config.xml, and managing the request processing lifecycle. Action (Option D) is a class developers extend, not the core controller. Options B and C don't exist in Struts.
-
backword overflow
-
forward overflow
-
Single controller servlet
-
no forward overflow
C
Correct answer
Explanation
The main drawback of Struts 1.x is having only a single controller servlet (ActionServlet), which creates a potential bottleneck since all requests must pass through one point. This can limit scalability and makes it harder to modularize large applications. Options A, B, and D (backword overflow, forward overflow, no forward overflow) are nonsense terms not related to Struts architecture. Struts 2 and later frameworks addressed this by allowing multiple controllers.
A
Correct answer
Explanation
The Model component in MVC represents data and business logic. In Java web applications, this is typically implemented using JavaBeans, which encapsulate data and provide methods to access and manipulate it. HTML, servlets, and JSP belong to the View and Controller layers.
C
Correct answer
Explanation
The View component in MVC handles presentation and user interface. In Java web applications, JSP (JavaServer Pages) is the standard technology for creating dynamic web content as the view layer. Beans and EJBs belong to Model, Servlets to Controller.
C
Correct answer
Explanation
The Controller component in MVC processes user requests and coordinates between Model and View. In Java web applications, Servlets serve as controllers by receiving HTTP requests, processing them, and dispatching to appropriate views (JSP) after updating models (beans).
A
Correct answer
Explanation
In MVC2 architecture, a single servlet (often called ActionServlet in Struts) acts as the central controller for all requests. This servlet receives every request, determines which action to invoke, and forwards to appropriate views. This centralized control is a key MVC2 characteristic.
-
information sent by web server
-
information sent by servlet
-
information sent by browser
-
information sent by jsp
A
Correct answer
Explanation
Cookies are small pieces of information sent by the web server to the browser, which are then stored and sent back with subsequent requests. They're used for session management, tracking, and remembering user preferences. The server initiates cookie creation.