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 platforms and products
  1. Add custom tags to each page

  2. Add entries to cache configuration file.

  3. Install the Cache Monitor.

  4. Pre-compile the JSPs

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

Before WebSphere dynacache can cache custom store pages, you must configure the cache by adding entries to the cachespec.xml file. This configuration file defines which pages to cache, cacheability rules, expiration policies, and other cache behavior parameters.

Multiple choice technology platforms and products
  1. global-forwards

  2. action-mappings

  3. message-resources

  4. global-exceptions

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

The Struts framework uses message-resources (MessageResources properties files) to define error message text that the framework uses for exception handling. These resource bundles contain key-value pairs where the framework looks up messages by key to display localized error text to users, which is the standard approach for externalizing message text in Struts applications.

Multiple choice technology platforms and products
  1. Set soapAction field to the operation name.

  2. Disable data binding and use SOAPElement.

  3. Do not backup and overwrite skeleton bean.

  4. Generate Java from WSDL using the no wrapped style.

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

In Rational Application Developer for WebSphere Commerce web services development, disabling data binding and using SOAPElement is required for handling complex SOAP messages where automatic Java object mapping would fail. This preference allows direct manipulation of the raw SOAP XML structure.

Multiple choice technology web technology
  1. Name, target, subdeployment, descriptor-file-name

  2. Domain, jms-server, connection factory, destination

  3. Config.xml, jms-module, subdeployment, descriptor-file-name

  4. Name, jms-module, subdeployment, descriptor-file-name

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

In WebLogic 9.2, JMS system-resource modules in config.xml require four basic components: a name for identification, target(s) to specify which servers/clusters, subdeployment for organizing resources, and descriptor-file-name pointing to the JMS configuration XML. Option B incorrectly lists runtime components rather than config elements. Option C incorrectly includes config.xml itself as a component.

Multiple choice technology web technology
  1. Graphical mode, console mode and secure mode

  2. Graphical mode, console mode and silent mode

  3. Script mode, console mode and silent mode

  4. Script mode, console mode and secure mode

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

WebLogic Server supports three installation modes: Graphical mode (GUI installer), Console mode (command-line interactive), and Silent mode (unattended using XML files). There is no 'secure mode' (A, D) or distinct 'script mode' (C, D) - the silent mode using scripts/XML is the correct term.

Multiple choice technology web technology
  1. Node Manager process is associated with the specific WebLogic domain

  2. Node Manager cannot start the admin server.

  3. Node Manager on one machine can start multiple Managed Servers on different machines.

  4. Node Manager on one machine can start multiple Managed Servers on the same machine.

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

The Java-based Node Manager runs per machine and can control multiple Managed Servers on that same machine (D). It is NOT domain-specific (A is false). It CAN start the Admin server (B is false). It cannot start servers on different machines - each machine needs its own Node Manager instance (C is false).

Multiple choice technology security
  1. An insecure J2EE web application

  2. A framework for analyzing applications that communicate using the HTTP and HTTPS, most common usage is an intercepting proxy

  3. Static Source Code Analyser

  4. Penetration Testing Tool

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

OWASP WebScarab is a framework for analyzing applications using HTTP/HTTPS protocols, primarily used as an intercepting proxy to inspect and modify traffic between clients and servers. It is not an insecure application, static analyzer, or dedicated penetration testing tool.

Multiple choice technology security
  1. An insecure J2EE web application

  2. A framework for analyzing applications that communicate using the HTTP and HTTPS, most common usage is an intercepting proxy

  3. Static Source Code Analyser

  4. Penetration Testing Tool

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

WebScarab is a framework developed by OWASP for analyzing applications that communicate via HTTP and HTTPS. Its most common usage is as an intercepting proxy, allowing security professionals to inspect and modify web traffic between browsers and servers for testing purposes.

Multiple choice technology security
  1. SQL Injection

  2. Denial of Service

  3. XML Injection

  4. All of the above

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

Web services face the same attack vectors as traditional web applications. SQL injection targets the database layer, DoS attacks overwhelm service availability, and XML injection exploits XML parsing vulnerabilities. All three are well-documented web service security threats.

Multiple choice technology security
  1. Page Scope

  2. Session Scope

  3. Request Scope

  4. Application Scope

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

In web applications, Session Scope stores data specific to a user session throughout their interaction with the application. Page Scope is per individual page, Request Scope lasts only for a single HTTP request, and Application Scope is global across all users and sessions. Session scope maintains user-specific state (like cart contents or login status) across multiple requests.

Multiple choice technology security
  1. The length of the User's Session

  2. The length of a single HTTP response

  3. The length of a single HTTP request

  4. Until the server is rebooted

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

Request scope in web applications refers to data and context that exists only for the duration of processing a single HTTP request. Once the response is sent, the request scope data is destroyed. Session scope persists across multiple requests from the same user, and application scope persists until server restart.

Multiple choice technology
  1. Technology

  2. Frameworks

  3. Java Development Tool Kit

  4. Language

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

Struts is a web application framework for Java that follows the Model-View-Controller (MVC) architecture pattern. It provides structure for building web applications, handling requests, managing views, and separating business logic from presentation. A framework provides reusable components and conventions, unlike a language, technology, or JDK.

Multiple choice technology
  1. True

  2. False

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

Spring MVC is fundamentally designed around the request-response lifecycle. Each HTTP request is handled by a dispatcher servlet, routed to controllers, and generates a response - making it a request-based framework.

Multiple choice technology
  1. Struts 1.3.8, Struts 1.2.8

  2. Struts 1.2.7,Struts 1.0.2

  3. Struts 3.0.11.1, Struts 1.0.11

  4. Struts 2.0.11.1, Struts 2.0.6

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

Struts framework has major versions 1.x and 2.x. Option C lists "Struts 3.0.11.1" which never existed - there was no Struts 3.x release (Apache Struts went from 2.x directly to Struts 2.5.x and beyond). The 3.0 version number is fictitious.

Multiple choice technology
  1. Both synchronous and asynchronous

  2. asynchronous

  3. synchronous

  4. none

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

JMS (Java Message Service) supports both synchronous (synchronous receive blocks until message arrives) and asynchronous (message listener receives callbacks) messaging modes, giving developers flexibility in application design.