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
Correct answer
Explanation
A Web Services Listener receives incoming service requests and routes them to the appropriate business logic component for processing. This is a fundamental pattern in service-oriented architectures where the listener acts as an entry point that delegates actual processing to backend components.
-
a. It is a distributed object system.
-
b. It is an RPC system.
-
c. It is even a Web application.
-
d. none of the above.
D
Correct answer
Explanation
SOAP (Simple Object Access Protocol) is NOT a distributed object system (like CORBA/DCOM). It's NOT purely an RPC system - it's a messaging protocol. It's definitely not a Web application. It's an XML-based protocol for exchanging structured information in web services. Options A, B, C are all incorrect characterizations, so D (none of the above) is correct.
-
true
-
b. False, SOAP doesn't define or imply a programming model.
-
False, SOAP can be used for messaging, RPC, Distributed object systems etc.
-
b and c
D
Correct answer
Explanation
SOAP is not limited to RPC. It defines a message format and envelope that can be used for various communication patterns including messaging, remote procedure calls, and distributed object systems. SOAP doesn't impose a specific programming model - it's protocol-agnostic.
-
a. true
-
b. false, SOAP is completely a request/response protocol
-
c. may be
-
d. may not be
A
Correct answer
Explanation
SOAP itself doesn't mandate any specific message exchange pattern (MEP). While request/response is common, SOAP supports various patterns including one-way, solicit-response, notification, and peer-to-peer messaging. The protocol is deliberately flexible about MEPs.
-
a. Use Web protocols
-
b. Are stateless
-
c. Are loosely coupled
-
Use XML as the universal data format
-
e. a and c only
-
f. all the above
F
Correct answer
Explanation
Web Services characteristics include: using web protocols (HTTP/HTTPS), statelessness (no client session context stored), loose coupling (minimal dependencies between services), and XML as universal data format. All four characteristics are correct.
-
File Poller
-
RV Subscriber
-
HTTP Receiver
-
All of these
D
Correct answer
Explanation
File Poller, RV (Rendezvous) Subscriber, and HTTP Receiver are all examples of Process Starter activities in TIBCO BusinessWorks. Process starters initiate process execution based on external events (file arrival, RV message, HTTP request). 'All of these' is the correct answer.
-
HTTP connection
-
JDBC update
-
Mapper activity
-
FTP connection
A,D
Correct answer
Explanation
Shared configurations in TIBCO BusinessWorks are reusable resource definitions that can be referenced across multiple activities. HTTP connection and FTP connection are classic examples - defined once and shared. JDBC update is activity-specific (not shareable), and Mapper is an activity (not a configuration resource).
-
Local Object Manager
-
Local Data Manager
-
Local SWE
-
Siebel Server
A,B,C
Correct answer
Explanation
Mobile web clients use local components for offline capability: Local Object Manager (A), Local Data Manager (B), and Local SWE (Siebel Web Engine) (C). The Siebel Server (D) is a server-side component used by web clients, not mobile web clients which rely on local components.
-
Object class
-
Action Servlet
-
Http Servlet
-
None Of the above
A
Correct answer
Explanation
The org.apache.struts.action.Action class in Struts extends java.lang.Object directly, not ActionServlet or HttpServlet. While Action classes work with HTTP requests (via execute method taking HttpServletRequest), they don't inherit from HttpServlet. ActionServlet is the front controller that handles all requests and delegates to Action classes - they are separate classes in the hierarchy.
-
A Technology
-
A Frameworks
-
A Java Development Tool Kit
-
A Language.
B
Correct answer
Explanation
Struts is a web application framework for Java. A framework provides structure, reusable components, and a standard architecture for building applications. Option A 'Technology' is too vague - Struts uses technology but isn't itself 'a technology'. Option C 'Java Development Tool Kit' refers to JDK. Option D 'A Language' is incorrect. Struts is specifically an MVC framework that helps organize web applications.
-
application
-
resources
-
ApplicationResources
-
Messages
A
Correct answer
Explanation
In Struts, the Application Resources file (containing localized messages) is specified through the 'application' servlet init-parameter in web.xml. This parameter points to the base name of the resource bundle (e.g., 'ApplicationResources' for ApplicationResources.properties). The servlet initialization code reads this parameter to load message resources.
-
HttpServletReuest reuest, HttpServletResponse response
-
HttpServletReuest reuest,ActionMapping mapping
-
ActionMapping mapping,HttpServletReuest reuest
-
ActionMapping mapping,HttpServletResponse response
C
Correct answer
Explanation
The validate() method in Struts ActionForm has the signature validate(ActionMapping mapping, HttpServletRequest request). It receives the mapping configuration and the current request to perform validation on form data. Option C correctly shows ActionMapping first, then HttpServletRequest.
-
WorkWeb 2
-
WebWork 2
-
Jstruts 2
-
None of the above
B
Correct answer
Explanation
Struts 2 was originally called WebWork 2 before the two frameworks merged. WebWork 2 was a separate framework that combined with Struts to create the more modern Struts 2 framework. This is historical knowledge about Struts evolution.
-
Bypass calls to the ActionForm validate method
-
Bypass validation of the Struts configuration file
-
Generate an error message if an unknown message key is used
-
None of Above
B
Correct answer
Explanation
The 'validating' init-param in ActionServlet controls whether Struts validates its configuration file (struts-config.xml). Setting it to 'false' or 'no' bypasses this validation during startup. This is useful for faster development cycles or when you're confident the config is correct.
-
ActionServlet
-
ReuestProcessor
-
Action
-
HttpReuest
B
Correct answer
Explanation
The RequestProcessor is responsible for processing requests in Struts, including instantiating ActionForm instances and placing them in the appropriate scope (request, session, or application) based on the scope attribute in the struts-config.xml configuration. Option A is the controller servlet but delegates this work. Option C is incorrect as Action classes execute business logic. Option D is not a class.