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. A browser that uses a plug-in to process user data.

  2. A distributed application where the client program does not process data, but instead passes data for processing to an enterprise bean running on an application server.

  3. An application that cannot be stopped by a firewall.

  4. An application compiled with the -thin option of the javac command.

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

A thin-client application is characterized by minimal client-side processing. The client primarily handles presentation and user interaction, while passing data to server-side components (like enterprise beans) for actual business logic processing. This reduces client complexity and centralizes processing.

Multiple choice technology web technology
  1. Special icons for creating the user interface elements for thin clients.

  2. A data module saved to the component area of the database.

  3. A self-contained functional software unit that is assembled into a J2EE application and interfaces with other application components.

  4. A JAR file

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

A J2EE component is a self-contained functional software unit that can be assembled into larger J2EE applications. Components like servlets, EJBs, and JSPs are modular and interface with other components through well-defined contracts. This is the fundamental definition of J2EE components.

Multiple choice technology web technology
  1. Entity bean data survives crashes.

  2. An entity bean represents non-persistent data.

  3. It creates its own JAR file during deployment.

  4. You get authentication code without having to write any.

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

Entity beans represent persistent business data that survives system crashes. They map to database tables and provide transactional data access. Session beans, in contrast, handle business logic and process non-persistent data that is lost when the session ends. This persistence is the key advantage.

Multiple choice technology web technology
  1. When you want to be certain your application data persists between program invocations, even in the event of a crash.

  2. If you need to initiate a database transaction.

  3. To process transient data that can be re-created in the event of a crash.

  4. To keep people who do not know how to program from accidentally changing important logic code.

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

Session beans represent work performed for a single client and hold transient, conversational state. Unlike entity beans or persistent storage, session bean state does not survive system crashes or program terminations. Thus, they process transient data that can be re-created.

Multiple choice technology web technology
  1. To make the user interface more interesting.

  2. To simplify application deployment.

  3. To prevent malicious programs from gaining access to sensitive information on your database server.

  4. To make the application much easier to update, maintain, and manage.

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

Using JSP for user interface with JavaBeans for data management separates presentation from business logic (Model-View pattern). This separation makes applications easier to update, maintain, and manage because UI changes don't affect business logic and vice versa. It promotes code reusability and modular design.

Multiple choice technology web technology
  1. The thin client.

  2. Deployment descriptors.

  3. The JAR file.

  4. The bean's container

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

The container manages data persistence for container-managed entity beans, handling storage and retrieval automatically. The thin client, deployment descriptors, and JAR files support the application but don't handle persistence directly.

Multiple choice technology web technology
  1. When you implement entity or session bean methods to use SQL commands you provide.

  2. When the bean's container handles data storage and retrieval.

  3. When the J2EE server is never shut down.

  4. When changes to database data are lost during a crash.

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

Bean-managed persistence means the developer implements SQL commands manually for entity or session beans, giving direct control over database operations. The container handles persistence in container-managed persistence, not in bean-managed.

Multiple choice technology web technology
  1. By thin clients.

  2. By calls to the database.

  3. By the J2EE server.

  4. By the bean's container.

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

Lifecycle methods of Enterprise JavaBeans (EJBs) are managed and invoked automatically by the EJB container at specific stages of the bean's existence. They are not called directly by database queries, thin clients, or the general J2EE application server itself.

Multiple choice technology web technology
  1. GenericServlet

  2. service()

  3. doTrace()

  4. HttpServlet class its a sub class of GenericServlet class

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

HttpServlet extends GenericServlet and provides HTTP-specific functionality through methods like doGet(), doPost(), etc. GenericServlet is protocol-independent while HttpServlet is designed specifically for HTTP processing. Option D correctly identifies this class and its relationship.

Multiple choice technology web technology
  1. no difference

  2. servlet runs slowly than CGI

  3. CGI is a complex process , servlet is easier ie lieght weight component

  4. none of these

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

CGI creates a new process for each request, making it resource-intensive and slower. Servlets run in a single JVM instance and use threading, making them lightweight and more efficient. Option C correctly captures this key architectural difference.

Multiple choice technology web technology
  1. for forward the request

  2. for include the content from the another URL

  3. both of these

  4. only for forward the request

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

The RequestDispatcher interface defines two methods: forward to send a request to another resource, and include to merge another resource's content. Therefore, it is designed for both purposes, making the combined option correct and the single-action distractors incomplete.