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
-
JMS
-
SOAP
-
Both A & B
-
None of the above
C
Correct answer
Explanation
BBE uses both JMS (Java Message Service) and SOAP (Simple Object Access Protocol) for messaging. These are two different messaging patterns used in enterprise integration.
-
Java Markup Service
-
Java Message Standard
-
Java Message Service
-
Both B & C
C
Correct answer
Explanation
JMS stands for Java Message Service. It's a Java API for messaging systems that allows applications to create, send, receive, and read messages.
-
Simple Object Access Protocol
-
Simplified Object Access Protocol
-
Simplified Object Access Program
-
Simple Or Advanced Protocol
A
Correct answer
Explanation
SOAP (Simple Object Access Protocol) is a messaging protocol for exchanging structured information in web services using XML. It provides a framework for web services communication independent of platform and implementation.
-
Application server is actually a program named Sapgui.exe. It is usually installed On a user’s workstation.
-
Application server is a set of executables that collectively interpret the ABAP/4 Programs and manage the input & output for them.
-
Presentation server is actually a program named Sapgui.exe. It is usually installed On a user’s workstation.
-
Presentation server is a set of executables that collectively interpret the ABAP/4 Programs and manage the input & output for them.
B,C
Correct answer
Explanation
Presentation server (SAPgui) runs on user workstations and provides the graphical interface. Application server executes ABAP programs and manages data flow between presentation and database layers.
-
WSDL
-
Web Services Directory
-
UDDI
-
All of the above
C
Correct answer
Explanation
UDDI (Universal Description, Discovery, and Integration) is the protocol used for web service directories/registries. It provides a standard way for businesses to publish and discover web services. WSDL describes individual services, not the directory protocol itself.
-
WS-Routing
-
WS-Referral
-
Not possible in SOAP.
-
a & b
A
Correct answer
Explanation
WS-Routing is a stateless protocol that extends SOAP by defining means to specify an ordered route for message transmission. It introduces SOAP headers that define the path a message should take through intermediaries. This enables explicit routing control while maintaining statelessness. Option A is correct.
A
Correct answer
Explanation
WS-Routing defines a 'path' SOAP header containing several elements including 'from', 'to', 'fwd', and 'rev'. The 'from' element specifically identifies the message originator (the sender). This is part of the routing information that helps track the message's journey through the network. Option A is correct.
B
Correct answer
Explanation
In WS-Routing, the "to" element within the SOAP "path" header specifies the ultimate receiver of the message. The "from" element identifies the original sender, "fwd" contains the forward path through intermediaries, and "rev" contains the reverse path for responses.
A
Correct answer
Explanation
The SOAP Header section is specifically designed for application-specific custom data, authentication information, transaction context, and other metadata that needs to travel with the message but isn't part of the actual payload. The Body contains the core message content.
B
Correct answer
Explanation
SOAP is fundamentally about document-based XML message exchange, not RPC-style object access. While SOAP can be used in an RPC-style (where Body contains method call parameters), the SOAP specification itself does not define object models, method invocation, or remote object access - those are implementation patterns layered on top of SOAP's messaging foundation.
A
Correct answer
Explanation
JSP (JavaServer Pages) technology is designed to be extensible through custom tag libraries, tag files, and integration with servlets and JavaBeans. This extensibility allows developers to create reusable components and separate presentation logic from business logic.
-
JSP standard directives.
-
JSP standard actions.
-
Script language declarations, scriplets and expressions.
-
A portable tag extension mechanism.
A,B,C,D
Correct answer
Explanation
The JSP specification comprehensively defines standard directives (page, include, taglib), standard actions (jsp:include, jsp:forward, jsp:useBean), script elements (declarations, scriptlets, expressions), and a portable tag extension mechanism for custom tags. All these components form the complete JSP feature set.
-
Objects with page scope are accessible only within the page where they are created
-
• References to objects with page scope are stored in the pagecontext object
-
All references to such an object shall be released after the response is sent back to the client from the JSP page or the request is forwarded somewhere else.
-
All of the above.
D
Correct answer
Explanation
Page scope in JSP is the most limited scope - objects are accessible only within the specific JSP page where they are created. References are stored in the implicit pageContext object, and all references are automatically released when the response is completed or the request is forwarded to another resource.
-
setContentType()
-
setPrintType()
-
setWriter()
-
setContentWriter()
A
Correct answer
Explanation
Before using PrintWriter to write response content, you must set the content type using response.setContentType() to inform the browser about the data format (e.g., text/html, application/json). This ensures proper character encoding and content rendering on the client side.
A
Correct answer
Explanation
The response.sendRedirect() method is indeed used to redirect the browser to a different resource. This sends an HTTP 302 status code to the client, causing the browser to make a new request to the specified URL. This is a client-side redirect, unlike jsp:forward which is server-side.