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
-
out class refers to the output stream for the http page
-
page class refers to the page Servlet interface
-
pageContext refers to the pages Servlet interface
-
config interface refers to the servlets configuration.
A,B,C,D
Correct answer
Explanation
All options describe JSP implicit objects correctly. 'out' is JspWriter for response output. 'page' is reference to the current servlet instance (this). 'pageContext' is PageContext providing access to all scopes and attributes. 'config' is ServletConfig containing initialization parameters. These are standard JSP implicit objects.
-
Model
-
View
-
Controller
-
None of the above
B
Correct answer
Explanation
In MVC architecture, JSP pages serve as the View layer responsible for presentation and display. The Model represents data and business logic (Java beans, EJBs). The Controller manages flow and request handling (Servlets, Struts actions). JSP templates display data provided by the controller.
-
jspInit(), jspDestroy(), init() , destroy()
-
init(),jspDestroy(),jspInit(),destroy()
-
destroy(),jspDestroy(),jspInit(),init()
-
init(),destroy(),jspInit(), jspDestroy()
A
Correct answer
Explanation
The JspPage interface defines the jspInit() and jspDestroy() lifecycle methods, which correspond to the init() and destroy() methods in standard servlets. The stored answer correctly maps these methods in the right order, whereas other options incorrectly mix or misalign the relationships.
-
Objects with session scope are accessible from pages processing requests that are in the same session as the one in which they were created.
-
It is not legal to define an object with session scope from within a page that is not session-aware.
-
All references to the object shall be released after the associated session ends.
-
References to objects with session scope are stored in the session object associated with the page activation.
A,B,C,D
Correct answer
Explanation
All statements correctly describe session scope in JSP. Session scope means objects persist across multiple requests from the same user. Non-session-aware pages (with session='false') cannot access session scope. Session-scoped objects are automatically released when the session invalidates or expires. References are stored in the HttpSession object.
B
Correct answer
Explanation
The ServletContext interface provides information about the web application container and environment rather than a specific client HTTP request. Information about a specific request is instead provided by the HttpServletRequest object.
B
Correct answer
Explanation
There is no direct method in the standard JSP or servlet API to explicitly verify whether a browser has accepted cookies. Developers typically must set a test cookie in one request and check for its presence in the subsequent request.
-
UDDI is a directory for storing information about web services
-
UDDI is a directory of web service interfaces described by WSDL
-
UDDI does not communicate via SOAP
-
UDDI is built into the Microsoft .NET platform
-
Service Callout
-
Routing
-
Publish
-
Java Callout
C
Correct answer
Explanation
Publish is the fire-and-forget interaction type in messaging systems, sending messages without waiting for responses or guarantees. Service Callout and Routing typically expect responses, while Java Callout depends on implementation.
-
Service Callout
-
Java Callout
-
Publish
-
Route Node
B
Correct answer
Explanation
Java Callout is the OSB action for calling Plain Old Java Objects (POJOs) from service flows. Service Callout invokes another OSB/proxy service, Publish is one-way messaging, Route Node is for request routing - only Java Callout calls POJOs.
-
XML variables
-
XML variables shared across the request flow.
-
XML variables shared across response flow.
-
XML variables shared across request and response flows.
D
Correct answer
Explanation
The OSB message context is a container for XML variables that persists throughout the entire message lifecycle - both the request pipeline and the response pipeline. Variables set during request processing are available during response processing, enabling data to be carried forward. Option D correctly captures this bidirectional sharing, while A is incomplete and B/C only describe half of the picture.
-
Business Service
-
Proxy Service
-
Message Flow
-
None of the above
A
Correct answer
Explanation
In Oracle Service Bus, a Business Service is the component that provides the interface to backend provider services. It abstracts the actual endpoint details (URL, protocol, etc.) and is invoked by Proxy Services. Proxy Services are client-facing entry points, not backend interfaces. Message Flow is the processing logic within a service, not an interface component.
-
Service Callout
-
Routing
-
Publish
-
Java Callout
C
Correct answer
Explanation
Publish is a fire-and-forget interaction pattern in OSB where the message is sent asynchronously without waiting for a response. Service Callout and Java Callout are synchronous (wait for response), Routing implies request-response pattern, making Publish the only true fire-and-forget option.
-
XML variables
-
XML variables shared across the request flow.
-
XML variables shared across response flow.
-
XML variables shared across request and response flows.
D
Correct answer
Explanation
The OSB message context is a shared XML-based storage that persists across both the request and response flows of a message processing pipeline. It's not limited to just request or just response - it's available throughout the entire message lifecycle in the proxy service.
-
Business Service
-
Proxy Service
-
Message Flow
-
None of the above
A
Correct answer
Explanation
In OSB, a Business Service provides the interface to backend provider services - it abstracts the actual endpoint and protocol details. Proxy Services expose the interface to consumers, Message Flow is the processing pipeline, making Business Service the correct answer for backend provider interface.
-
Service Callout
-
Java Callout
-
Publish
-
Route Node
B
Correct answer
Explanation
Java Callout is the OSB action specifically designed to invoke Plain Old Java Objects (POJOs) from within the message flow. Service Callout is for calling other services, Publish is for async messaging, and Route Node is for request-response routing.