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. Java Screen Page

  2. Java Service Page

  3. Java Screen Program

  4. Java Server Pages

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

JSP stands for Java Server Pages, a server-side Java technology that enables dynamic web content generation. It uses HTML-like tags with embedded Java code to create platform-independent web applications.

Multiple choice technology web technology
  1. bottom up

  2. top to bottom

  3. Both 1 &2

  4. none of these

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

Converting an existing Java application into a web service typically follows a 'bottom-up' approach, where you start with the existing Java code and expose it as a web service interface. This contrasts with 'top-down' where you'd design the WSDL first. 'Bottom up' is the standard approach for legacy application conversion.

Multiple choice technology web technology
  1. a protocol that uses XML messages to perform RPC

  2. a SOAP Message

  3. Used In WSDL

  4. none of these

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

XML-RPC (Remote Procedure Call) is a protocol that uses XML-encoded messages to perform procedure calls over HTTP. It's a simpler precursor to SOAP. Option A correctly defines it as a protocol using XML messages for RPC. SOAP messages are different (more complex), and while WSDL may describe XML-RPC services, that's not what XML-RPC itself is.

Multiple choice technology web technology
  1. A HTTP Protocol

  2. A protocol that uses XML messages to perform RPC

  3. An XML-based protocol for exchanging information betweenServices

  4. An XML-based protocol for exchanging information between computers

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

SOAP (Simple Object Access Protocol) is an XML-based protocol for exchanging structured information between computers over networks. Option D is the most complete and accurate definition. Option B describes XML-RPC more specifically, and while SOAP does use XML for RPC, its broader purpose is information exchange between systems/computers.

Multiple choice technology web technology
  1. Its a discovery layer within the Web services protocol stack

  2. RPC call

  3. Same as WSDL

  4. Both 2 & 3

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

UDDI (Universal Description, Discovery, and Integration) was designed as a discovery layer within the web services protocol stack - a registry for publishing and finding web services. Option A correctly identifies this. It's not an RPC call, and while it works alongside WSDL, it's not the same thing.

Multiple choice technology architecture
  1. RequiresNew

  2. Supported

  3. Never

  4. Mandatory

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

EJB transaction attributes control method invocation behavior. 'Never' means the method must NOT be invoked within a transaction context - if a client has an active transaction, the container throws an exception. 'Mandatory' requires a transaction (opposite), 'RequiresNew' always creates a new transaction, and 'Supported' runs with or without a transaction.

Multiple choice technology architecture
  1. State can be cached but is not representative of the client state

  2. State can be cached but is representative of client state

  3. State is persistent

  4. State is cached first, and then persisted.

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

Stateful session beans maintain conversational state with specific clients across method invocations - the cached state represents that client's ongoing session. Stateless beans have NO affinity to clients - any instance can serve any client request, and any cached state is transient and not client-specific. Stateful beans are NOT about persistence.

Multiple choice technology architecture
  1. CMP

  2. BMP

  3. Both

  4. None of the Above

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

ECRM TIR likely refers to a specific enterprise application component. EJB entity beans use either Container-Managed Persistence (CMP) or Bean-Managed Persistence (BMP). The question expects CMP as the answer, indicating container handles database operations. Without domain context about ECRM TIR's architecture, we accept the claimed answer.

Multiple choice technology architecture
  1. Proxy

  2. Decorator

  3. Mediator

  4. Factory

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

The EJB Home interface acts as a Factory pattern - it creates, finds, and removes EJB instances. EJB clients use JNDI to look up the Home interface (the factory), then call create() or findByPrimaryKey() methods to obtain bean references. This abstracts bean instantiation lifecycle. Proxy (A) is for remote/local interfaces, not Home. Decorator and Mediator don't apply.

Multiple choice technology web technology
  1. Not always true

  2. False

  3. True

  4. None of these

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

Web Services indeed define a platform-independent standard based on XML for communication in distributed systems. This is a fundamental characteristic of web services architecture - they use XML-based protocols like SOAP to enable cross-platform communication.

Multiple choice technology web technology
  1. currency conversion

  2. web browsers

  3. weather reports

  4. language translation

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

Web Services provide functional capabilities like currency conversion, weather reports, and language translation as service components. However, web browsers are client applications, not application components that web services would offer. Web services are consumed BY web browsers, not offered AS web browsers.

Multiple choice technology web technology
  1. Simplified Object Access Protocol

  2. Simplified Object Authenication Protocol

  3. Specified Simple Object Access Protocol

  4. Simple Object Access Protocol

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

SOAP is an acronym for Simple Object Access Protocol, a standardized web‑service protocol. The other alternatives modify or add words that are not part of the official name.

Multiple choice technology architecture
  1. Less code than a BMP entity bean

  2. Faster data access than BMP

  3. Reduced coupling with entity bean

  4. Easier to code than BMP entity bean

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

DAO pattern provides faster data access than BMP by abstracting persistence logic and optimizing database calls. It reduces coupling by separating data access from business logic in entity beans, making the code more maintainable.

Multiple choice technology web technology
  1. True

  2. False

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

JSP pages are translated into Java servlets behind the scenes. The JSP container converts the JSP into Java source code, compiles it into a servlet class, and loads it. This translation and compilation happens only once when the JSP is first requested, making subsequent loads much faster since only the compiled servlet needs to be executed.