Computer Knowledge

Java Enterprise and Web Technologies

2,183 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. New specification request in the community process

  2. A toolkit that allows developers to build, test and deploy Web Services

  3. Includes reference implementations for JavaServer Faces (JSF),JAXB,JAXP,JAXR,JAX-RPC,SAAJ and JSTL

  4. B and C

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

The Java Web Services Developer Pack (WSDP) is a comprehensive toolkit for web service development. It provides reference implementations for key Java XML and web service technologies including JSF, JAXB, JAXP, JAXR, JAX-RPC, SAAJ, and JSTL, giving developers a complete environment to build, test, and deploy web services applications.

Multiple choice technology web technology
  1. To read and write to-from a UDDI registry using SOAP messages

  2. To read and write to-from an ebXML registry using SOAP messages

  3. A and B

  4. None of the above

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

JAX-R (Java API for XML Registries) provides a uniform, standard Java API for accessing different kinds of XML registries. It natively supports both UDDI (specification version 2.0) and ebXML (Registry services and Information Model) registries using XML/SOAP messaging.

Multiple choice technology web technology
  1. Can be used to generate server side and client side Java (Web Service) code from a WSDL

  2. Can be used to generate a WSDL from Java (Web Service) code

  3. Both A and B

  4. None of the above

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

JAX-RPC (Java API for XML-based RPC) supports bidirectional code generation. Developers can use tooling like wscompile to generate Java client/server stubs from an existing WSDL document (top-down), or generate a WSDL definition from Java source files (bottom-up).

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 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 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).

Multiple choice technology web technology
  1. True

  2. False

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

Web Services fundamentally use XML as the data exchange format, making them platform-independent. Any system can communicate with any other system regardless of programming language or operating system, as long as they can parse XML. This is a core advantage of the web services architecture.

Multiple choice technology web technology
  1. the currency conversion

  2. weather reports

  3. the language translation

  4. web browsers

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

Web Services offer application components like currency conversion, weather reports, and language translation as remote services over the network. Web browsers are client applications that consume web services and web content, not components that web services offer. Browsers are the consumers, not the provided service.

Multiple choice technology operating systems
  1. android.net.wifi

  2. android.wifi.net

  3. android.net.wireless

  4. android.wireless.net

  5. android.wifi.wireless

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

The android.net.wifi package provides classes to manage Wi-Fi functionality on Android devices. This package includes WifiManager for accessing Wi-Fi network information, configuring networks, and scanning for available networks. The package naming convention in Android follows reverse domain notation with android.net.wifi being the correct package name. Options B, C, D, E all have incorrect word orders or use 'wireless' instead of 'wifi'.

Multiple choice technology operating systems
  1. contents

  2. filter

  3. intents

  4. activator

  5. servlets

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

Intents are the messaging system in Android that activate core components like activities, services, and broadcast receivers. An Intent is essentially a message object that requests an action from another component. Contents and filters are UI concepts, servlets are Java web technologies, and 'activator' is not an Android term.

Multiple choice technology packaged enterprise solutions
  1. Activity

  2. Service

  3. Broadcast Transmitter

  4. Broadcast Receiver

  5. Content Provider

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

A Content Provider manages access to a central repository of data, allowing applications to securely share data with other apps. Activities handle UI, Services run background tasks, and Broadcast Receivers listen for system-wide announcements, leaving Content Provider as the correct component for sharing data.

Multiple choice technology operating systems
  1. MediaPlayer & MediaRecorder

  2. MediaPlay & MediaRecord

  3. PlayMedia & RecordMedia

  4. Mediaplay & Mediarecord

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

MediaPlayer is used for playback and MediaRecorder for recording audio/video in Android. These are the official Android framework classes for media operations. The other options (MediaPlay, RecordMedia, PlayMedia, Mediaplay, Mediarecord) are not valid Android class names.