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. Two Administration server and one Managed servers
-
b. One Administration server and optional Managed servers
-
c. One Administration server and two Managed servers
-
d. None of the above
B
Correct answer
Explanation
A WebLogic domain must have exactly one Administration Server and can have zero or more Managed Servers. The Administration Server manages the domain configuration, while Managed Servers host applications.
-
a. HTTP server
-
b. Web server
-
c. Application server
-
d. None of the above
C
Correct answer
Explanation
WebLogic Server is an application server that provides a runtime environment for Java EE applications. It supports enterprise features like EJB, JMS, JPA, and clustering, which distinguish it from simple web servers that primarily serve static content or handle HTTP requests.
-
a. Only WAR files
-
b. Only EAR files
-
c. Only SAR files
-
d. All of the above.
D
Correct answer
Explanation
WebLogic Server supports deployment of multiple archive types: WAR files for web applications, EAR files for enterprise applications, SAR files for service archives, and JAR files for libraries or standalone components. All these formats can be deployed to WebLogic domains.
-
a. Development
-
b. Staging
-
c. Production
-
d. None of the above
A,C
Correct answer
Explanation
WebLogic Server operates in two modes: Development mode, which enables auto-deployment and provides verbose logging for debugging, and Production mode, which optimizes performance and security with stricter settings. Staging is not a standard WebLogic operational mode.
-
a. BEA-000215
-
b. ORACLE-BEA-000215
-
c. MESSAGE-000215
-
d. ERROR-000215
A
Correct answer
Explanation
WebLogic Server message IDs follow a standardized format consisting of the prefix 'BEA-' followed by a six-digit numeric identifier, such as 'BEA-000215'.
-
a. Graphical, Console, Secure
-
b. Graphical, Console, Silent
-
c. Graphical, Network, Silent
-
d. Interactive, Console, Silent
B
Correct answer
Explanation
WebLogic Server supports three installation modes: Graphical mode (GUI-based wizard), Console mode (command-line interactive), and Silent mode (unattended using XML configuration). 'Secure' and 'Network' are not valid installation modes in WebLogic.
-
a. Server Log
-
b. WebLogic Console
-
c. Version.txt
-
d. weblogic.Admin utility
C
Correct answer
Explanation
Version.txt is not a standard WebLogic file or method for version identification. Server logs contain version information at startup, the WebLogic Console displays the version prominently, and the weblogic.Admin utility can report version through appropriate commands. Version.txt simply doesn't exist in a standard WebLogic installation.
-
a. WL_HOME/common/weblogic.jar
-
b. WL_HOME/common/admin.jar
-
c. WL_HOME/server/lib/admin.jar
-
d. WL_HOME/server/lib/weblogic.jar
D
Correct answer
Explanation
The weblogic.Admin utility classes are contained within weblogic.jar, located in the WL_HOME/server/lib directory of the WebLogic installation. This JAR must be included in the classpath to execute admin commands - the other paths either don't exist or contain the wrong JAR files for this utility.
-
a. Two Administration server and one Managed servers
-
b. One Administration server and optional Managed servers
-
c. One Administration server and two Managed servers
-
d. None of the above
B
Correct answer
Explanation
A WebLogic domain must contain exactly one Administration Server, which acts as the central control point, and zero or more optional Managed Servers that host the actual applications.
-
HEAD
-
GET
-
POST
-
TRACE
-
RETURN
D
Correct answer
Explanation
The TRACE method performs a message loop-back test along the path to the target resource, returning the exact request received by the server to the client for debugging purposes. HEAD only retrieves headers, GET retrieves data, and POST submits data.
-
It has access to a ServletConfig
-
It has access to a ServletContext
-
It is only called once
-
It can be overridden
A,B,C,D
Correct answer
Explanation
The jspInit() method is called once when the JSP is first initialized, similar to servlet init(). It has access to both ServletConfig (getServletConfig()) and ServletContext (getServletContext()), and it can be overridden like any JSP method. All four statements are correct.
-
response.setHeader(CONTENT-LENGTH,"numBytes");
-
response.setHeader("CONTENT-LENGTH","numBytes");
-
response.setStatus(1024);
-
response.setHeader("CONTENT-LENGTH",1024);
B
Correct answer
Explanation
The setHeader method in HttpServletResponse requires both parameters to be strings. Option B correctly passes the header name "CONTENT-LENGTH" and its value "numBytes" as quoted string literals. Option A is incorrect because CONTENT-LENGTH is not quoted, while D passes an integer instead of a string.
-
Enable instance failover
-
Configure shared server
-
Enable database failover
-
Enable connect-time failover
-
Enable Transparent Application Failover
D
Correct answer
Explanation
Connect-time failover is a client-side feature that automatically forwards connection requests to another listener if the primary listener fails to respond. This is configured in tnsnames.ora with the FAILOVER=ON parameter and multiple ADDRESS lists. Instance failover and TAF are different mechanisms for handling failures after connection is established.
A
Correct answer
Explanation
A web service is indeed defined as programmable application logic that can be accessed over standard web protocols like HTTP, SOAP, or REST. This is the standard industry definition - web services expose functionality through standardized web-based interfaces that allow different applications to communicate regardless of their underlying platforms or implementation languages.
-
a. WSDL
-
b. Web Services Directory
-
c. UDDI
-
d. All of the above
C
Correct answer
Explanation
UDDI (Universal Description, Discovery, and Integration) is the protocol used for publishing and discovering web services in directories. Option C is correct. Option A (WSDL) is for describing services, not directory publishing. Option B is a generic description, not a protocol. Option D is incorrect because UDDI is the specific standard, not 'all of the above'.