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

Multiple choice technology architecture
  1. SOAP

  2. XML

  3. UDDI

  4. WSDL

Reveal answer Fill a bubble to check yourself
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.

Multiple choice technology architecture
  1. Accessing a UDDI description from the WSDL registry and binds to the service using SOAP

  2. Accessing a SOAP description from the UDDI registry and binds to the service using UDDI

  3. Accessing a SOAP description from the WSDL registry and binds to the service using UDDI

  4. Accessing a WSDL description from the UDDI registry and binds to the service using SOAP

Reveal answer Fill a bubble to check yourself
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.

Multiple choice technology architecture
  1. Compilers for different programming languages and target machines

  2. Decision support systems

  3. Web applications

  4. Middleware

Reveal answer Fill a bubble to check yourself
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.

Multiple choice technology web technology
  1. SerivceTypeAttribute

  2. ServiceAttribute

  3. ServiceBehaviourAttribute

  4. ServiceTypeBehaviour

Reveal answer Fill a bubble to check yourself
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).

Multiple choice technology web technology
  1. Message

  2. Stream,IXMLSerializable

  3. Message,Stream

  4. Message,Stream or an IXMLSerializable

Reveal answer Fill a bubble to check yourself
D Correct answer
Explanation

In WCF, only Message, Stream, and types implementing IXMLSerializable can be used as parameters for streaming operations. These types support streaming because they can be read and written sequentially without buffering the entire message.

Multiple choice technology
  1. Starting the car

  2. Authentication

  3. Audit trails

  4. Adjusting room temperature

Reveal answer Fill a bubble to check yourself
A,B,C,D Correct answer
Explanation

Java Ring is a smart card technology that can be programmed for various applications. All listed uses are theoretically possible implementations - authentication (most common), audit trails (security logging), starting cars (ignition systems), and adjusting room temperature (smart home integration). The question asks what it CAN be used for, not just typical uses.

Multiple choice technology architecture
  1. Action Servlet

  2. Action Controller

  3. JSP

  4. All of the above

Reveal answer Fill a bubble to check yourself
B Correct answer
Explanation

In MVC architecture, the Action Controller is responsible for handling user requests and updating the model state. It processes input, executes business logic, and modifies model data as needed. The Action Servlet handles request routing, JSP is for presentation, and neither directly performs model updates. The controller layer is specifically designed for this coordination role.

Multiple choice technology architecture
  1. Request

  2. Cookie

  3. Application context

  4. Global Session

Reveal answer Fill a bubble to check yourself
D Correct answer
Explanation

Global Session provides application-wide data persistence across all pages and requests for a specific user. Request scope only lasts for a single HTTP request, Cookie has size limitations and security concerns, and Application context is shared across all users rather than being session-specific.

Multiple choice technology architecture
  1. Action Controller

  2. Action Servlet

  3. JSP

  4. PageHandler

Reveal answer Fill a bubble to check yourself
D Correct answer
Explanation

The PageHandler component is responsible for validating user input in the PS Framework architecture. Action Controller manages flow control, Action Servlet handles request dispatching, and JSP is for presentation - none of these are primarily responsible for input validation.

Multiple choice technology architecture
  1. Action Servlet

  2. Action Controller

  3. JSP

  4. PS.xml

Reveal answer Fill a bubble to check yourself
B Correct answer
Explanation

The Action Controller is where business services are invoked in the PS Framework's MVC architecture. Action Servlet handles request routing, JSP manages presentation, and PS.xml contains configuration - only the Controller orchestrates business logic.

Multiple choice technology architecture
  1. Web.xml

  2. Metadata.xml

  3. InitializationWebapp.properties

  4. Config.xml

Reveal answer Fill a bubble to check yourself
C Correct answer
Explanation

InitializationWebapp.properties is where the PS Framework expects entries for ps.xml location so that the Action Servlet can locate and load the configuration during application startup. Web.xml is for servlet configuration, and the other files are not standard initialization mechanisms.

Multiple choice technology architecture
  1. getApplicationID()

  2. getSecurityLevel()

  3. getSessionBehaviour()

  4. None of the above

Reveal answer Fill a bubble to check yourself
A Correct answer
Explanation

getApplicationID() is the minimum required method override for ActionServlet in the PS Framework, as it uniquely identifies the application within the system. getSecurityLevel() and getSessionBehaviour() are optional overrides for specific customization needs.

Multiple choice technology architecture
  1. Client Modules

  2. Web App Modules

  3. EJB Modules

  4. All the above

Reveal answer Fill a bubble to check yourself
D Correct answer
Explanation

EAR (Enterprise Archive) files in Java EE can contain multiple module types including web application modules (WAR files), EJB modules (JAR files with enterprise beans), and client application JARs. This modular structure allows packaging complete enterprise applications with all their components.