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 web technology
  1. an out of memory error on the client

  2. a SOAP fault

  3. communication failure due to network error

  4. incorrect configuration of stubs

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

RemoteException occurs when a remote method invocation fails. A SOAP fault from a web service translates to a RemoteException in Java clients. Network communication failures during remote calls also trigger RemoteException. Out of memory errors cause runtime exceptions like OutOfMemoryError, not RemoteException. Stub configuration errors cause compilation or initialization exceptions, not RemoteException.

Multiple choice technology web technology
  1. Master Page

  2. Page Class

  3. Session Class

  4. None of the Above

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

All Web forms in ASP.NET inherit from the Page class, which is the base class that provides core functionality for server-side processing, rendering, and lifecycle management. The Page class is part of the System.Web.UI namespace and serves as the foundation for all web pages. Master Pages inherit from Page, not the other way around.

Multiple choice technology web technology
  1. Session.Dump

  2. Session.Abandon

  3. Session.Exit

  4. None of the Above

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

In ASP.NET, Session.Abandon is used to end the current session and release its resources. This method cancels the session and allows the session state to be garbage collected. Dump and Exit are not valid methods on the Session object - Abandon is the correct method for session termination.

Multiple choice technology web technology
  1. Server.Transfer

  2. Response.Redirect

  3. Both A) and B)

  4. None of the Above

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

Server.Transfer transfers execution directly to another page on the server side without requiring a round-trip to the client. It preserves the original URL and does not trigger a new HTTP request. Response.Redirect sends a 302 response to the client, causing a new request, which is slower and changes the URL.

Multiple choice technology platforms and products
  1. True

  2. False

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

xPression (often associated with document composition and content management) is indeed designed with a component-based SOA architecture. It integrates with multiple technology stacks including J2EE (Java), Web Services, JMS (Java Message Service), Microsoft .NET framework, and XML for data interchange.

Multiple choice technology web technology
  1. Service to store per-user data throughout session.

  2. Service to store per-user data accross sessions i.e. persistently

  3. Home page in your web application

  4. Menu page in your web application

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

The Profile service in ASP.NET provides persistent per-user data storage that persists across multiple sessions, unlike session state which is temporary. It allows storing user-specific preferences and data that survives session expiration. Options C and D are unrelated.

Multiple choice technology architecture
  1. Business Delegate

  2. Model View Controller

  3. Fast Lane Reader

  4. View Helper

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

The Business Delegate pattern reduces coupling between the presentation tier (Web) and business logic tiers by acting as an intermediary. It hides the complexity of business service lookup and exception handling, providing a clean interface to the web layer. This creates a loose coupling between tiers.

Multiple choice technology web technology
  1. ApplicationContext Module

  2. AOP Module

  3. Core Container Module

  4. DAO Module

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

The Core Container Module is the foundation of the Spring Framework, providing essential functionality like IoC (Inversion of Control) and dependency injection. BeanFactory, the heart of this module, manages bean configuration and lifecycle. Other modules like AOP, DAO, and ApplicationContext build on this core foundation.

Multiple choice technology web technology
  1. Application Context Module

  2. AOP Module

  3. Core Container Module

  4. DAO Module

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

The ApplicationContext module extends BeanFactory and adds enterprise features: internationalization (I18N), event publication, resource loading, and validation. This is what makes Spring a complete framework rather than just an IoC container.

Multiple choice technology programming languages
  1. It has access to a ServletConfig

  2. It has access to a ServeletContext

  3. It is only called once

  4. It can be overridden

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

The jspInit() method is called once during JSP initialization, has access to both ServletConfig and ServletContext (via config.getServletContext()), and can be overridden like other JSP lifecycle methods. All four statements are true.

Multiple choice technology programming languages
  1. stream

  2. context

  3. exception

  4. application

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

JSP implicit objects include exception (available in error pages) and application (representing ServletContext). 'stream' is not a valid implicit object, and 'context' should be 'application' - the actual implicit object name.

Multiple choice technology programming languages
  1. Both jspInit() and jspDestroy can be overridden

  2. Only jspInit() can be overridden

  3. Only jspDestroy() can be overridden

  4. Only _jspService can be overridden

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

Both jspInit() and jspDestroy() are JSP lifecycle methods that can be overridden to customize initialization and cleanup behavior. The _jspService method cannot be overridden as it's auto-generated by the container.

Multiple choice technology programming languages
  1. getPageContext()

  2. findAttribute(String)

  3. getAttribute(String, int)

  4. getAttribute(String)

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

The getAttribute(String, int) method is the most efficient way to access an attribute when you know its scope because it bypasses scope searching. The int parameter is a scope constant (APPLICATION_SCOPE, SESSION_SCOPE, REQUEST_SCOPE, PAGE_SCOPE) that directly accesses the specified scope. getAttribute(String) without scope parameter searches all scopes sequentially, while findAttribute() also searches scopes. getPageContext() returns the PageContext object itself, not the attribute value.