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 databases
  1. Perform Object Java Oriented

  2. Plain Object Java Old

  3. Platform Oriented Java Object

  4. Plain Old Java Object

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

Hibernate works best with POJOs, which stands for Plain Old Java Objects. This programming model emphasizes simple, lightweight Java classes that do not inherit from framework-specific classes or implement restrictive interfaces.

Multiple choice technology databases
  1. Connection Management

  2. Bean Management

  3. Transaction Management

  4. Object relational mapping

  5. Relational Management

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

Hibernate's core architecture comprises Connection Management (database connectivity), Transaction Management (ACID transaction handling), and Object Relational Mapping (mapping Java objects to database tables). Bean Management is a Spring/EJB concept, not part of Hibernate.

Multiple choice technology web technology
  1. Mongrel

  2. Apache

  3. Webrick

  4. Tomcat

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

WEBrick is Ruby's built-in HTTP server library and serves as the default development server for Rails applications. While production environments typically use more performant servers like Puma or Unicorn, WEBrick is included with Ruby and requires no additional configuration for development work.

Multiple choice technology web technology
  1. Stateless event driven

  2. Streaming API Driven

  3. Static binding of XSD to Java components

  4. All the above

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

JAXB uses static binding of XSD to Java components, meaning Java classes are generated at compile time from the schema. This differs from SAX (stateless event-driven) and StAX (streaming API) which are dynamic parsers.

Multiple choice technology web technology
  1. The Content tree is specific to schema

  2. Content tree is not created dynamically

  3. As there is no extra tree manipulation functionality

  4. As it allows data access through accessor methods

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

JAXB uses memory efficiently because the content tree is not created dynamically - it's generated at compile time from the schema, avoiding runtime overhead. Schema-specific trees (A) and accessor methods (D) don't directly explain efficiency.

Multiple choice technology programming languages
  1. Server in java.net package

  2. ServerSocket in java.util.package

  3. Server in java.util package

  4. ServerSocket in java.net package

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

ServerSocket is the correct class for implementing TCP servers in Java, and it is located in the java.net package, not java.util. Option B incorrectly places ServerSocket in java.util, while options A and C reference a non-existent 'Server' class.

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. one of the above

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

JAX-RPC supports round-trip development in both directions: it can generate Java stubs (server and client) from WSDL (top-down approach) and generate WSDL from Java interfaces (bottom-up approach). This bidirectional capability is captured in option C. Both A and B individually are incomplete.

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

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

  3. A standard XML parsing technique

  4. none of the above

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

JAXP is a standard Java API that provides a pluggable abstraction layer over different XML parser implementations (like DOM and SAX parsers from various vendors). It does not implement parsing itself but standardizes how developers interact with parsers. Option B correctly describes this abstraction, despite minor phrasing issues.

Multiple choice technology web technology
  1. True

  2. False

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

JAX-RPC implements standard web service specifications (SOAP, WSDL, XML Schema) that ensure cross-platform interoperability. Java web services built with JAX-RPC can consume .NET services and vice versa because both adhere to WS-I standards. This interoperability is a fundamental design goal of web services.

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

JAXR provides a unified Java API for accessing different types of XML-based business registries, including both UDDI and ebXML registries. It abstracts the registry-specific details through a common interface, supporting operations like publishing and querying service metadata. Option C correctly identifies this dual support.

Multiple choice technology web technology
  1. A toolkit that allows developers to build, test and deploy Web Services

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

  3. New specification request in the community process

  4. A and B

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

Java WSDP is a toolkit providing integrated tools, APIs, and reference implementations for building web services (option A). It includes reference implementations for multiple Java XML technologies (option B lists them). The pack is a practical development toolkit, not a specification request (C is wrong). D correctly combines A and B.

Multiple choice technology programming languages
  1. Serializable

  2. Remote

  3. Cloneable

  4. List

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

Marker interfaces have no methods and serve only to mark classes for special treatment by the JVM or compiler. Serializable, Remote, and Cloneable are marker interfaces, while List is a regular interface with multiple methods defining collection operations like add(), get(), and remove().

Multiple choice technology databases
  1. It will clean up your code and reduce the complexity of iBATIS

  2. It will generate the folder structure and delete the Objects from the cache memory

  3. It will clean up your code and improve the usability of iBATIS in the long term

  4. None of the above

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

Using namespaces properly in iBATIS organizes SQL mappings and prevents naming conflicts. This cleaner structure makes code more maintainable and iBATIS easier to use over time. Option B incorrectly mentions deleting Objects from cache, which is unrelated.