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
-
Java Screen Page
-
Java Service Page
-
Java Screen Program
-
Java Server Pages
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.
-
bottom up
-
top to bottom
-
Both 1 &2
-
none of these
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.
-
a protocol that uses XML messages to perform RPC
-
a SOAP Message
-
Used In WSDL
-
none of these
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.
-
A HTTP Protocol
-
A protocol that uses XML messages to perform RPC
-
An XML-based protocol for exchanging information betweenServices
-
An XML-based protocol for exchanging information between computers
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.
-
Its a discovery layer within the Web services protocol stack
-
RPC call
-
Same as WSDL
-
Both 2 & 3
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.
-
RequiresNew
-
Supported
-
Never
-
Mandatory
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.
-
State can be cached but is not representative of the client state
-
State can be cached but is representative of client state
-
State is persistent
-
State is cached first, and then persisted.
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.
-
CMP
-
BMP
-
Both
-
None of the Above
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.
-
Less code than a BMP entity bean
-
Faster data access than BMP
-
Reduced coupling with entity bean
-
Easier to code than BMP entity bean
-
Proxy
-
Decorator
-
Mediator
-
Factory
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.
-
Not always true
-
False
-
True
-
None of these
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.
-
currency conversion
-
web browsers
-
weather reports
-
language translation
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.
-
Simplified Object Access Protocol
-
Simplified Object Authenication Protocol
-
Specified Simple Object Access Protocol
-
Simple Object Access Protocol
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.
-
Less code than a BMP entity bean
-
Faster data access than BMP
-
Reduced coupling with entity bean
-
Easier to code than BMP entity bean
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.
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.