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
A
Correct answer
Explanation
WSDL (Web Services Description Language) is the standard XML document that describes a web service's interface, operations, and data types. It is distributed to clients so they can understand how to call the service. SOAP is the messaging protocol, UDDI is for service discovery, and HTTP is the transport layer.
-
Aysnchronous Javascript and XML
-
Application Javascript and XML
-
Asynchronous JDK and XML
-
Application JDK and XML
A
Correct answer
Explanation
AJAX stands for Asynchronous JavaScript and XML. It's a technique for making web pages dynamic by exchanging data with a server asynchronously without reloading the entire page. The 'A' is for Asynchronous, not Application. JDK is incorrect as AJAX is JavaScript-based, not Java.
-
axacommercialintraweb.java
-
axacommercialintraweb.txt
-
axacommercialintraweb.properties
-
axacommercialintraweb.config
A
Correct answer
Explanation
This question assumes knowledge of a specific implementation. In Java-based ruleset controllers, the event flow controller is typically a Java class file, which would have the .java extension. This is a plausible naming convention.
-
getServletInfo()
-
getInitParameters()
-
getServletConfig()
-
None
C
Correct answer
Explanation
The GenericServlet class implements Servlet and provides getServletConfig() to retrieve the ServletConfig object passed to the init(ServletConfig) method. getServletInfo() returns descriptive text, and getInitParameters() does not exist directly with that name on GenericServlet.
-
session, request
-
exception, request
-
exception, config
-
session, exception
D
Correct answer
Explanation
In JSP, the session implicit object is unavailable if the page directive disables sessions (session="false"). The exception implicit object is only available on error pages (isErrorPage="true"). Thus, under standard configurations, both may be unavailable depending on the directives configured.
-
null
-
Primary Key class
-
Home Object
-
Remote Object
A
Correct answer
Explanation
In Entity JavaBeans (EJB), the ejbCreate() method for Container-Managed Persistence (CMP) beans returns null. For BMP (Bean-Managed Persistence) beans, it returns the primary key class. This is a key difference between CMP and BMP bean creation methods.
-
Structs Config
-
WebXML
-
ServletConfig
-
None of the above
C
Correct answer
Explanation
The ServletConfig interface is used by the servlet container to pass initialization parameters and configuration information to a servlet instance during its initialization (via the init method). WebXML is not a standard interface, and Structs Config is a framework-specific concept.
-
sessions
-
HttpRequest
-
HttpResponse
-
Java Beans
-
Cookies
E
Correct answer
Explanation
Cookies are small text files stored on the client side that maintain state information across HTTP requests. Sessions are server-side mechanisms (cookies often store the session ID). HttpRequest/HttpResponse are request/response objects, not state storage. Java Beans are component models, not state mechanisms.
B
Correct answer
Explanation
Modern web and application servers support dynamic class reloading or hot deployment, meaning a servlet class can be recompiled and reloaded without shutting down the entire web server. This makes the statement false, making the designated 'False' option correct.
-
Structs Config
-
WebXML
-
ServletConfig
-
None of the above
C
Correct answer
Explanation
ServletConfig is an interface implemented by the servlet container to pass configuration information (init parameters, servlet context) to a servlet during initialization. It's accessed via getServletConfig(). Struts Config is framework-specific, WebXML is deployment descriptor format.
-
sessions
-
HttpRequest
-
HttpResponse
-
Java Beans
-
Cookies
E
Correct answer
Explanation
Cookies are small text files stored on the client side that maintain state information across HTTP requests. Sessions are server-side mechanisms (cookies often store the session ID). HttpRequest/HttpResponse are request/response objects, not state storage. Java Beans are component models, not state mechanisms.
B
Correct answer
Explanation
Modern servlet containers support hot deployment and dynamic reloading, allowing servlet modification without server shutdown. The context can be reloaded or the servlet can be replaced dynamically. Shutdown is NOT required. This is a standard feature in production servers.
-
Android.location
-
com.google.android.map
-
com.tcs.mobility
-
None of the above
A,B
Correct answer
Explanation
android.location (standard platform API) and com.google.android.maps (add-on library) are official packages used for location and maps in older Android development. com.tcs.mobility is a proprietary or custom package name, and is not part of the standard APIs.
-
mapping file
-
mapping-file
-
session-factory
-
session
C
Correct answer
Explanation
In hibernate.cfg.xml, the session-factory tag is the root element that contains all Hibernate configuration including database connection properties, mapping resources, and cache settings. The mapping resource is specified using nested tags inside session-factory, not as standalone tags like 'mapping file' or 'mapping-file'.
-
Sets the application-level default channels to use for all services
-
Contains a service adapter definition
-
Fully qualified name of the Java class that provides the adapter functionality
-
Indicates whether this adapter is the default adapter for service destinations.
A
Correct answer
Explanation
In BlazeDS configuration, the `` element defines the application-level default channels to use for all services when a service destination does not explicitly specify one. The other options describe adapters and adapter configurations.