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
-
public ActionErrors validate(ActionMapping mapping,HttpServletReuest reuest)
-
public ActionError validate(ActionMapping mapping, HttpServletReuest reuest)
-
public ActionError validate(HttpServletReuest reuest, HttpServletResponse response)
-
None of the above
A
Correct answer
Explanation
The validate() method signature is public ActionErrors validate(ActionMapping mapping, HttpServletRequest request). It returns ActionErrors (plural) to collect multiple validation failures, and accepts the mapping and request objects.
-
BasicServlet
-
EntryServlet
-
ActionServlet
-
StrutsServlet
C
Correct answer
Explanation
ActionServlet is the central controller servlet in Struts architecture. It receives all requests and dispatches them to appropriate Action classes based on the struts-config.xml configuration.
-
SessionFacade
-
Filter
-
Front controller
-
Back controller
C
Correct answer
Explanation
ActionServlet implements the Front Controller pattern, centralizing request handling and routing. It intercepts all requests, delegates to Actions, and manages the overall application flow.
-
List
-
String
-
Boolean
-
Collection
D
Correct answer
Explanation
ActionForm cannot automatically populate Collection types from request parameters. It handles simple types (String, Boolean) and arrays, but not generic Collection interfaces due to type ambiguity.
-
initialize
-
config
-
setup
-
param
B
Correct answer
Explanation
The 'config' init parameter in web.xml specifies the location of the Struts configuration file (struts-config.xml). This tells ActionServlet where to load the application configuration.
-
Session , request
-
Page, request, session
-
Page, request, session, application
-
request, session, application
A
Correct answer
Explanation
In Struts 1, the scope attribute of an action mapping specifies where the ActionForm bean is stored. The only two valid scopes supported for this attribute are request and session. Other scopes like page and application are not valid options for managing form beans in Struts configuration.
-
Small
-
Any
-
Average
-
Verysmall
B
Correct answer
Explanation
The Apache Struts framework is designed to be highly scalable and flexible, making it well-suited for web applications of any size, from small projects to large-scale enterprise systems. It does not restrict developers to a specific application size, rendering the other options incorrect.
-
WorkWeb 2
-
WebWork 2
-
Jstruts 2
-
None of the above
B
Correct answer
Explanation
Struts 2 framework was originally developed as WebWork 2 and was later merged with the Struts 1 framework to create Struts 2. The WebWork framework was renamed and integrated, making WebWork 2 the correct answer. WorkWeb and Jstruts are not actual names associated with Struts 2.
-
Overriding the populateBean method of the ActionMapping
-
Overriding the processPopulate method of the Request Processor
-
Overriding the populate method of the ActionForm
-
None of the above
B
Correct answer
Explanation
In Struts 1.1, the RequestProcessor class handles form population. The processPopulate method is responsible for populating ActionForm beans with request parameters. Overriding this method allows developers to customize how form data is populated, making option B correct. ActionMapping's populateBean and ActionForm's populate methods are not the standard extension points for this behavior.
-
Application Logger
-
Event viewer
-
All the above
-
None of the above
B
Correct answer
Explanation
In the context of the InQuira platform, the 'Event Viewer' is the specific administrative tool designed to view, filter, and analyze the binary application log data. 'Application Logger' is not a standard tool for viewing these logs, making 'Event viewer' the correct choice.
-
connection between an Execution Unit (XU) and a non-EJB rule session in a J2SE application server
-
connection between an Execution Unit (XU) and a non-EJB rule session in a J2EE application server
-
connection between an Execution Unit (XU) and a EJB rule session in a J2EE application server
-
connection between an Rule Team Server and a EJB rule session in a J2EE application server
B
Correct answer
Explanation
IlrSimpleRuleSessionProvider is part of IBM WebSphere ILOG JRules. It provides a connection between the Execution Unit (XU) and a non-EJB rule session within a J2EE application server environment. This is different from J2SE which is a standalone Java environment without enterprise features.
-
Message-driven beans (MDBs)
-
EJB query language (EJB-QL)
-
Support for Web services
-
All of the Above
-
Only 1 & 2
-
Only 1 & 3
-
Entity beans are permanent business entities
-
Entity Beans are persistence objects
-
EntityBeans are permanent
-
All of the Above
-
Only 1 & 2
-
Only 1 & 3
D
Correct answer
Explanation
Entity Beans in Enterprise JavaBeans (EJB) represent persistent business data stored in a database, making them both permanent business entities and persistent objects. Since options 1, 2, and 3 describe these characteristics accurately, "All of the Above" is the correct choice.
B
Correct answer
Explanation
Stateful Session Beans are NOT persistent by design. They maintain conversational state for a specific client session but do not survive container crashes. For database persistence, Entity Beans (later JPA entities) are the correct component type.
-
business MO
-
UI MO
-
DB
-
none of the above
B
Correct answer
Explanation
UI MO (UI Model Object) is the immediate data source for JSP pages, holding data ready for display. Business MO and DB are backend sources that require additional processing, while UI MO is the presentation layer's direct data interface.