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
-
SQL Injection
-
Denial of Service
-
XML Injection
-
All of the above
D
Correct answer
Explanation
Web Services (SOAP, REST, etc.) are susceptible to the full range of web application attacks. SQL Injection can target backend databases accessed through the service. Denial of Service attacks can overwhelm service endpoints. XML External Entity (XXE) attacks and XML injection specifically target XML-based services. The integration complexity and data formats used in web services expose them to multiple attack vectors.
-
Page Scope
-
Session Scope
-
Request Scope
-
Application Scope
B
Correct answer
Explanation
Session scope specifically stores data tied to a single user's session across multiple requests. Page scope is for single-page data, request scope lasts only for one HTTP request, and application scope is shared across all users. Only session scope maintains user-specific state throughout their interaction with the application.
-
The length of the User's Session
-
The length of a single HTTP response
-
The length of a single HTTP request
-
Until the server is rebooted
C
Correct answer
Explanation
Request scope in web applications refers to data that persists only for the duration of processing a single HTTP request from client to server. It does not span multiple requests (session), responses only, or extend beyond the request lifecycle.
-
Http Cookies
-
Memory Flags
-
http request ID
-
http Request Parameters
A
Correct answer
Explanation
HTTP cookies are the standard mechanism for maintaining user sessions in web applications. The server sends a session identifier to the client's browser, which stores it as a cookie. The browser automatically sends this cookie with subsequent requests, allowing the server to identify and maintain the user's session state across multiple HTTP requests.
-
Remove the node and replace it with a healthy node
-
Debug the node to see why the application fails from the specific node and fix the issue
-
leave the nodes as it is.
-
None of the above.
A
Correct answer
Explanation
When a web application fails on specific nodes affecting overall availability, the immediate solution is to remove the faulty node and replace it with a healthy one. This restores availability quickly. Debugging can happen later on the failed node. Option A prioritizes system availability over root cause analysis, which is the correct approach for immediate resolution.
-
Execution group
-
Configuration Manager
-
Queue Manager
-
User Name Server
B
Correct answer
Explanation
The Configuration Manager is the component that connects the Message Broker Toolkit to the brokers, allowing developers to deploy and manage message flows. Execution groups run the flows, Queue Managers handle messaging queues, and User Name Server manages security.
B
Correct answer
Explanation
When customizing a JSP in the /custom layer, you must copy the ENTIRE file, not just the changing parts. The layered inheritance mechanism works at the file level, not at the content level within a file.
B
Correct answer
Explanation
WSDL (Web Services Description Language) is an XML-based specification that describes how to access a web service. It defines the service endpoint, operations, message formats, and protocols. UDDI is for discovery/registry, SOAP is for messaging, and ESB is an integration architecture pattern - none of these describe the access interface itself.
A
Correct answer
Explanation
UDDI (Universal Description, Discovery, and Integration) provides a registry-based mechanism for publishing and discovering web services. It allows organizations to list their services and enables clients to search for available services by type, category, or other criteria. WSDL describes interfaces, SOAP handles messaging, and ESB is an integration pattern.
D
Correct answer
Explanation
RMI (Remote Method Invocation) is a Java-specific remote communication technology that uses binary serialization, not XML. It's tightly coupled to the Java platform. In contrast, UDDI, WSDL, and SOAP are all XML-based specifications that form the core of web services, providing platform-neutral interoperability through XML messaging.
A
Correct answer
Explanation
SOAP (Simple Object Access Protocol) is the complete web service framework that defines the XML message format, HTTP binding conventions, and RPC representation standards. XML (B) is just the data encoding format, UDDI (C) is for service discovery registry, and WSDL (D) describes the service interface but not the message protocol itself.
-
Accessing a UDDI description from the WSDL registry and binds to the service using SOAP
-
Accessing a SOAP description from the UDDI registry and binds to the service using UDDI
-
Accessing a SOAP description from the WSDL registry and binds to the service using UDDI
-
Accessing a WSDL description from the UDDI registry and binds to the service using SOAP
D
Correct answer
Explanation
Web service consumption follows the pattern: discover the service in UDDI (registry), retrieve its WSDL description (interface definition), then bind using SOAP (message protocol). Option D correctly sequences these steps. Options A-C incorrectly pair the protocols with their purposes or reverse the registry relationship.
-
Compilers for different programming languages and target machines
-
Decision support systems
-
Web applications
-
Middleware
C
Correct answer
Explanation
Option C is correct because Apache Struts is a web application framework for Java - it specifically addresses the domain of building web-based applications and follows the Model-View-Controller (MVC) pattern. Options A (compilers), B (decision support systems), and D (middleware) are different problem domains that Struts is not designed to solve. Struts provides utilities for handling HTTP requests, managing form data, and organizing web application logic.
-
cookie
-
sessionStorage
-
dataStorage
-
localStorage
B,D
Correct answer
Explanation
HTML5 introduced Web Storage API with sessionStorage (data cleared when session ends) and localStorage (persists until deleted). Cookies are an older mechanism with size limitations, and dataStorage is not a valid HTML5 storage object.
-
SerivceTypeAttribute
-
ServiceAttribute
-
ServiceBehaviourAttribute
-
ServiceTypeBehaviour
C
Correct answer
Explanation
ServiceBehaviorAttribute in WCF controls service instance lifetime through the InstanceContextMode property. This property determines whether a single instance serves all clients (Single), each client gets its own instance (PerSession), or each call gets a new instance (PerCall).