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. Programming language.

  2. Protocol.

  3. Framework.

  4. Web server.

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

JSF (JavaServer Faces) is a Java web application framework for building component-based user interfaces. It simplifies web development by providing reusable UI components, managing state, and handling server-side logic. It is NOT a programming language (A), protocol (B), or web server (D) - it's a framework that runs on web servers.

Multiple choice technology web technology
  1. Programming language.

  2. Protocol.

  3. Framework.

  4. Web server.

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

JSF (JavaServer Faces) is a Java web application framework for building component-based user interfaces. It simplifies web development by providing reusable UI components, managing state, and handling server-side logic. It is NOT a programming language (A), protocol (B), or web server (D) - it's a framework that runs on web servers.

Multiple choice technology web technology
  1. Invoke application.

  2. Apply request values

  3. Update model values

  4. Process validations

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

JSF lifecycle phases in order are: Restore View, Apply Request Values, Process Validations, Update Model Values, Invoke Application, and Render Response. Process Validations is the 3rd phase where validators are executed on component values.

Multiple choice technology web technology
  1. portlet, page, book, menu, desktop

  2. book, page, portlet, desktop, menu

  3. desktop, book, menu, page, portlet

  4. menu, desktop, book, page, portlet

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

Portal skeleton execution follows a hierarchy: Desktop (outermost) → Book → Menu → Page → Portlet (innermost). This order ensures proper nesting and rendering of portal components from broadest to most specific.

Multiple choice technology performance
  1. JProfiler

  2. YourKit

  3. Jensor

  4. DataXplod

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

Jensor is a Java profiling tool developed by TCS (Tata Consultancy Services). JProfiler and YourKit are commercial profilers from other companies. DataXplor is not a standard Java profiler. Option C is correct - Jensor is TCS's proprietary Java profiling solution.

Multiple choice technology web technology
  1. Event Handlers

  2. Backing files

  3. onRefresh method

  4. listenTo portlet property

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

Event Handlers are the preferred and recommended mechanism for implementing Inter-Portlet Communication (IPC) in modern portal frameworks. They provide a decoupled, event-driven architecture where portlets can publish and subscribe to events without direct dependencies. Backing files are for lifecycle management, onRefresh is a specific lifecycle method, and listenTo portlet property is an older, less flexible approach.

Multiple choice technology packaged enterprise solutions
  1. It Stores the custom pages in the content db

  2. It abstracts the details of file system

  3. It abstracts the details of where the page files are stored away from the asp.net runtime

  4. It is a pluggable component to abstract the filesystem pages.

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

Virtual Path Provider is a mechanism in SharePoint that allows ASP.NET to serve pages from non-file system locations (like the content database) by abstracting the physical storage location from the runtime.

Multiple choice technology programming languages
  1. True

  2. False

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

Java ME (Micro Edition) supports SSL (Secure Sockets Layer) and HTTPS connections through the Generic Connection Framework (GCF). The framework provides security APIs including HTTPS and SSL/TLS protocols that allow secure network communication in mobile applications. SSL connections require proper security certificates and domain permissions configured in the JAD (Java Application Descriptor) file or device security settings.

Multiple choice technology architecture
  1. Portability to all browsers needs to be addressed.

  2. Your code may be exposed.

  3. Reduction of page refreshes to enhance user experience.

  4. Simulating client state on the browser and reducing the number of views.

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

Moving all business logic to JavaScript creates two main problems: (1) Portability must be tested across all browsers since JavaScript implementations and DOM APIs vary, requiring extensive cross-browser testing and compatibility layers, and (2) Client-side code is inherently exposed to users who can view source, debug, and potentially exploit logic or extract proprietary algorithms. Options C and D are benefits (reduced refreshes, client state simulation), not drawbacks.

Multiple choice technology architecture
  1. XML Schema document and details of Message Body is required to build a client.

  2. WSDL document and Message headers must be supplied.

  3. There is no need to supply WSDL or XML Schema document to the client.

  4. Both WSDL document and XML Schema document must be supplied to the client.

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

The JAX-WS Dispatch API allows dynamic service invocation without requiring compile-time WSDL or XML Schema. The Dispatch interface works directly with XML or SOAP messages, making it possible to invoke services when only the service endpoint and message structure are known at runtime. This is in contrast to static proxy generation which requires WSDL at development time.

Multiple choice technology architecture
  1. Static and Dynamic only

  2. static only

  3. Synchronous and Asynchronous

  4. synchronous only.

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

JAX-WS supports both static proxy-based invocation (generating client stubs from WSDL at compile time) and dynamic invocation (using Dispatch API at runtime). It also supports both synchronous (blocking) and asynchronous (non-blocking with callbacks or polling) invocation patterns. These represent independent dimensions - static/dynamic refers to how the client is created, synchronous/asynchronous refers to how the call is made.

Multiple choice technology architecture
  1. Logging protocol specific information

  2. Adding security information to the message

  3. Modifying protocol headers

  4. Logic to service the request

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

JAX-WS handlers are designed for cross-cutting concerns like logging protocol messages, adding security headers, or modifying protocol headers. They are NOT meant to contain business logic that services the request - that responsibility belongs to the service endpoint implementation class.

Multiple choice technology architecture
  1. .NET application must be able to call your service.

  2. Your client could be built in any language and run on any platform.

  3. Guaranteed message delivery

  4. Provide reusable & interoperable service across the industry.

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

Java EE WebServices provide interoperability across platforms and languages (making .NET integration possible), support reusable services, and work with diverse clients. However, basic web services do NOT guarantee message delivery - that requires additional standards like WS-ReliableMessaging.

Multiple choice technology architecture
  1. Code Break up

  2. Code engineering

  3. Code Tiering

  4. Code Factoring

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

Code Factoring is the technique of extracting common functionality into separate, reusable modules. Scott is asking developers to factor out business logic from servlets/JSP into EJBs, creating a cleaner separation between presentation logic and business logic.

Multiple choice technology architecture
  1. Modularizing Code

  2. Using well defined software design patterns

  3. Using Servlets to manage distributed database access

  4. Using JSP Scriptlets to locate enterprise beans

  5. Using Data Access Objects when Session Beans or BMP Entity beans have to communicate to the database

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

System extensibility is aided by modular code, design patterns, and DAO patterns. However, using Servlets to directly manage distributed database access tightly couples presentation to data access, and using JSP Scriptlets to locate EJBs embeds business logic in presentation - both harm extensibility.