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

  2. False

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

The Business Delegate design pattern is used to decouple presentation tier code from business tier services. To achieve this, it frequently leverages the Service Locator pattern to hide the underlying complexities of locating, creating, and accessing remote enterprise beans and web services.

Multiple choice technology web technology
  1. True

  2. False

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

Transfer Objects (also called Value Objects) are used to transfer data across tiers. While they often implement Serializable for network transmission in Java EE environments, it's not strictly mandatory. Other serialization mechanisms (XML, JSON, custom protocols) can be used. The interface is a practical requirement for RMI/IIOP but not a theoretical necessity for the pattern itself.

Multiple choice technology web technology
  1. Action

  2. ActionForm

  3. ActionServlet

  4. None of the above

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

In Struts framework, ActionServlet implements the Front Controller pattern. It receives all HTTP requests and delegates them to appropriate Action classes based on the struts-config.xml configuration. ActionServlet is the single entry point that handles common request processing tasks like navigation, workflow, and security, which is the essence of Front Controller pattern.

Multiple choice technology
  1. A Java application for remote access to Microsoft servers via the Internet

  2. The recommended way of having multiple invocations of the same program running on a single system

  3. The pre-cursor of Java, now largely superceded

  4. A way of having a Java program or applet on one computer use Java methods and objects that are residing on another

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

RMI (Remote Method Invocation) enables a Java client to invoke methods on objects residing on remote servers, enabling distributed Java applications.

Multiple choice technology
  1. to keep strawberry jam fresh

  2. to store all the currently in-use Java programs on a browser

  3. as a container for a number of files for distribution over a network so that only the jar has to be transfered, and

  4. as a central resource on a web server from which users can load just the Java programs they need without having to

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

JAR (Java Archive) bundles multiple class files and resources into one compressed file for efficient distribution - only one HTTP request needed instead of many.

Multiple choice technology
  1. A piece of Java running within a web browser

  2. A short application program which resides completely in a single file

  3. An application which isn't invoked directly by the user, but is called up from within another application as, and

  4. A piece of Java which is only allowed to produce graphic output and cannot write to the screen in any other way.

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

An applet is a Java program designed to be transmitted over the Internet and executed within a web browser. It runs in a sandboxed environment for security. Options B and C describe other types of software components, while D incorrectly restricts applets to only graphics.

Multiple choice technology
  1. A browser, written in Java by Sun

  2. A package supplied by Symantec Cafe which provides much prettier buttons, scroll bars and other widgets than the

  3. A Java compiler which uses "Just in time" technology to speed up system throughput.

  4. A Java Engine which can be called up using a single keystroke or "hot key".

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

HotJava was the first web browser written in Java, developed by Sun Microsystems in 1995. It demonstrated Java's capability for building complex applications. Options B, C, and D refer to other products or concepts - Symantec Cafe was an IDE, JIT compilation is a compiler optimization, not a browser.

Multiple choice technology web technology
  1. servlet.jar

  2. jsp-api.jar

  3. servletapi.jar

  4. servlet-api.jar

  5. servlet1.1.jar

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

The standard Java Servlet API is packaged in servlet-api.jar (in modern versions, javax.servlet-api.jar). This JAR contains the interfaces and classes for implementing servlets. servlet.jar, servletapi.jar, and servlet1.1.jar are not the standard naming conventions for the official Servlet API library.

Multiple choice technology web technology
  1. init(),getServletInfo(),destroy(),service(),getServletConfig()

  2. init(),getServletConfig(),service(),getServletInfo(),destroy()

  3. init(),destroy(),getServletInfo(),getServletConfig(),destroy()

  4. destroy(),service(),init(),getServletConfig(),getServletInfo()

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

The servlet lifecycle methods in order are: init() (called once when servlet is first loaded), service() (called for each request), and destroy() (called once before servlet is unloaded). getServletConfig() retrieves configuration and is available after init(), while getServletInfo() returns servlet information. Option B correctly sequences the core lifecycle: init, then service, then destroy.

Multiple choice technology
  1. Message Path on the Server

  2. Handlers and the Message Path in Axis

  3. Message Path on the Client

  4. All of the above

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

Apache Axis architecture consists of three main architectural components: the Message Path on the Server (how messages flow through server-side processing), Handlers and the Message Path in Axis (the processing chain), and the Message Path on the Client (how messages flow through client-side processing). All three are fundamental architectural elements.

Multiple choice technology web technology
  1. Java Keyword

  2. Web Browser

  3. Java Framework

  4. Programming Language

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

Hibernate is an object-relational mapping (ORM) framework for the Java programming language. It provides a framework for mapping object-oriented domain models to relational databases, simplifying database operations in Java applications.

Multiple choice technology embedded technologies
  1. container

  2. objects

  3. classes & interfaces

  4. bean

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

EJB components run inside an EJB container, which provides services like transaction management, security, concurrency, and lifecycle management. Objects, classes, interfaces, and beans are not deployment environments.

Multiple choice technology embedded technologies
  1. bean

  2. objects

  3. classes & nterfaces

  4. methods

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

An Enterprise JavaBean (EJB) component is defined by a set of Java classes and interfaces, such as the bean implementation class, home interface, and component interface. Together, these define the EJB's lifecycle and client interactions, making this option the only complete definition.