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 programming languages
  1. HttpSession

  2. ServletConfig

  3. ServletContext

  4. HttpServletRequest

  5. HttpServletResponse

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

When forwarding requests between servlets in different web applications, the session and servlet context are not shared. HttpServletRequest attributes are preserved during forward operations and are accessible only to the target servlet, making them the ideal mechanism for data sharing in this scenario. HttpSession and ServletContext are shared within the same web application, not across applications.

Multiple choice technology web technology
  1. Session is a cookie

  2. Session is basically is the duration between user login and logout time

  3. Session is a server side variable

  4. Session usually is non persistent cookie

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

A session represents the duration of a user's interaction with an application, typically spanning from login to logout. During this period, the server maintains user-specific state and data. While sessions are often implemented using cookies or server-side variables, the fundamental concept is the time duration itself, not the implementation mechanism. Sessions are generally persistent across multiple requests within the same login period.

Multiple choice technology web technology
  1. yes, request is handled by a light-weight Action object

  2. struts threadsafe depends on action class logic

  3. no

  4. none of these

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

Struts is designed to be thread-safe by creating a new (or reusing a pooled) lightweight Action instance for each request. Each Action invocation operates on its own ActionForm instance with no shared state between requests, making thread safety the default when developers follow best practices.

Multiple choice technology web technology
  1. True

  2. False

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

These are indeed the core classes in Struts 1.x: ActionServlet (front controller), Action (request handler), ActionForward (navigation), ActionMapping (configuration mapping), ActionErrors/ActionMessages (error messaging), RequestProcessor (processing pipeline), and ActionForm (data transfer). The list is comprehensive and correct.

Multiple choice technology web technology
  1. Dispatcher View ,Composite View ,Front Controller ,View Helper ,Synchronizer Token

  2. j2ee has no design pattern

  3. Service to Worker ,Dispatcher View ,Composite View ,Front Controller ,View Helper ,Synchronizer Token

  4. Dispatcher View,Service to Worker and Composite View only

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

J2EE design patterns include Front Controller, View Helper, Dispatcher View, Composite View, Service to Worker, and Synchronizer Token. Option C lists all these patterns comprehensively. Option A is incomplete (missing Service to Worker), and Option D is too limited.

Multiple choice technology packaged enterprise solutions
  1. True

  2. False

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

Object interfaces provide external applications with specific APIs to interact with Siebel, but they do not directly provide database access or support all mentioned technologies (CORBA, COM, Java beans). External applications use Siebel's proprietary interfaces (COM Data Control, Java Data Bean, Web Services) rather than generic CORBA or direct database connections.

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.