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. True, because they both generate the same SOAP message

  2. False, because one is written in Java and the other in C# etc

  3. None of the above

  4. Both 1 and 2 are correct

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

Web services built using different programming languages can interoperate because they generate standardized SOAP messages. The language-specific implementation handles the SOAP creation, but the resulting XML message follows the same specification regardless of whether it's generated by Java, C#, or any other language. This language independence is a key design principle of SOAP-based web services.

Multiple choice technology web technology
  1. A new XML parser implementation

  2. A standard XML parsing technique

  3. A standard XML API that can be used by developers with over an XML parser

  4. All of the above

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

JAXP (Java API for XML Processing) is a standard API that provides a consistent interface for working with XML parsers in Java. It enables pluggable XML parsers (DOM, SAX, XSLT) without code changes. Option A incorrectly calls it a parser implementation - it's an abstraction layer over parsers. Option B is imprecise - it's an API, not a parsing technique.

Multiple choice technology web technology
  1. True

  2. False

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

ZK is a server-side framework where ZUML markup and Java code are executed on the server. The framework generates HTML and JavaScript that is sent to the client browser. All business logic, event handling, and component creation happens server-side, with ZK's AJAX engine handling client-server communication seamlessly. This is a fundamental architectural characteristic of ZK.

Multiple choice technology platforms and products
  1. Enables reuse and replacement of components

  2. Developer do not have full access to the Framework APIs used by core application

  3. Developer can run background services

  4. both, b & c

  5. None of above

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

Android is designed to give developers full access to the same framework APIs that core applications use. Thus, stating developers do not have full access (597001) is false, making it the correct answer here. Other choices like enabling reuse (597000) and running background services (597002) are true statements.

Multiple choice technology web technology
  1. open-source

  2. Ajax based

  3. written in php

  4. Event driven

  5. written in java

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

ZK is a Java-based open-source Ajax framework that uses event-driven architecture. It is NOT written in PHP. ZK enables server-centric UI development with automatic Ajax updates, separating events by desktop and processing them sequentially per desktop.

Multiple choice technology web technology
  1. client centric

  2. Server Centric

  3. Data Centric

  4. Process Centric

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

ZK uses a server-centric approach where all UI logic and event handling execute on the server. The framework automatically handles Ajax communication between browser and server, abstracting away client-side complexity. This differs from client-centric frameworks like GWT or Angular.

Multiple choice technology web 2.0
  1. Windows GUI application

  2. Distributed COM

  3. Windows Service

  4. Web Service

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

Web Services are designed to support interoperable machine-to-machine interaction over a network using standard protocols like HTTP and exchanging payloads in XML formats (such as SOAP). Windows GUI apps, Windows Services, and DCOM do not inherently fit this design pattern.

Multiple choice technology programming languages
  1. Mapping files can be added to Configuration in the application code

  2. They can be configured in hibernate.cfg.xml using the <mapping> elements

  3. Both a and b

  4. None of the above

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

Hibernate mapping files can be configured either programmatically by adding them to the Configuration object in code, or declaratively in hibernate.cfg.xml using elements. Both approaches are valid and often both are used together.

Multiple choice technology programming languages
  1. Session.createQuery();

  2. Session.createCriteria();

  3. Session.createSQLQuery();

  4. Session.lod();

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

HQL (Hibernate Query Language) is used with Session.createQuery() method. This method creates a Query object that executes HQL queries against the database. Session.createCriteria() is for the Criteria API (deprecated in favor of JPA Criteria), and Session.createSQLQuery() is for native SQL queries, not HQL.

Multiple choice technology
  1. User defined function

  2. Session variable

  3. Mapping parameter

  4. Session parameter

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

Mapping parameters in Informatica PowerCenter are designed to hold values that change between sessions (like dates, file paths, or external values). They're set before session execution. Session variables are runtime-modifiable, while UDFs are for custom logic, making mapping parameters the best choice for frequently changing external values.

Multiple choice technology platforms and products
  1. True

  2. False

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

Android uses a different Java virtual machine (Dalvik or ART) and different class libraries than Java ME or Java SE. Android applications are compiled to Dalvik bytecode (.dex format), not standard JVM bytecode. Standard Java ME/SE applications cannot run on Android without significant modification due to these fundamental differences in runtime environment and APIs.

Multiple choice technology web technology
  1. Account.Username

  2. User.Name

  3. Page.Username

  4. Environment.Username

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

Environment.Username retrieves the Windows identity account name under which the current thread is executing. For ASP.NET applications, this returns the application pool identity (such as NETWORK SERVICE, IIS_APPPOOL, or a custom service account) configured in IIS.

Multiple choice technology databases
  1. Construction

  2. Destruction

  3. Activation

  4. Passivation

  5. All the above

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

Stateful session beans in EJB (Enterprise JavaBeans) go through several lifecycle callbacks: Construction (when created), Destruction (when removed), Activation (when passivated bean is activated), and Passivation (when temporarily serialized to storage). All four lifecycle states have corresponding callback methods, making 'All the above' the correct answer.

Multiple choice technology databases
  1. RequiresNew

  2. Supported

  3. Never

  4. Mandatory

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

The 'Never' transaction attribute in EJB deployment descriptors ensures that a method will never be invoked within an existing transaction context. If called within a transaction, the container throws an exception. 'RequiresNew' always creates a new transaction, 'Supported' runs within existing transaction if present, and 'Mandatory' requires an existing transaction to be present (throws exception if none exists).