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
-
Spring ORM
-
Spring DAO
-
Spring Context
-
Spring Core
D
Correct answer
Explanation
Spring Core container (specifically the BeanFactory and ApplicationContext) is responsible for creating, configuring, and managing beans. It defines how beans are instantiated, wired together, and their lifecycle is managed.
-
Aspect Oriented Programming
-
Inversion Of Control
-
Object Oriented Programming
-
Simple Pattern
B
Correct answer
Explanation
Inversion of Control (IoC) is the design pattern where the Bean Factory manages object creation and dependency injection, separating configuration metadata from actual business logic code. This promotes loose coupling and easier testing.
-
singleton
-
Pototype
-
Both 1 and 2
-
none of the above
C
Correct answer
Explanation
The Spring Bean Factory supports two main scopes: singleton (default, one shared instance) and prototype (new instance per request). Option C correctly states that both are supported.
-
/WEB-INF
-
/appserverInstallDirectory/webapps/webappName/WEB-INF/xml
-
/appserverInstallDirectory/webapps/webappName/WEB-INF
-
/appserverInstallDirectory/webapps/webappName/WEB-INF/classes
A,C
Correct answer
Explanation
In Java web applications, the deployment descriptor (web.xml) must be located in the WEB-INF directory. Valid locations include /WEB-INF directly, or the full path like /appserverInstallDirectory/webapps/webappName/WEB-INF. However, it cannot be in subdirectories like /WEB-INF/xml or /WEB-INF/classes - it must be directly in the WEB-INF folder itself.
-
The only way to access resources under the /WEB-INF directory is through appropriate servlet mapping directives in the deployment descriptor
-
Server-side code has access to all resources in the web application
-
Clients of web applications can't directly access resources in /WEB-INF/tld.
-
A good place to keep a .tld (tag library file) is directly in the /WEB-INF directory.
B,C,D
Correct answer
Explanation
In Java web applications: (A) is false because server-side code can also access /WEB-INF resources via ServletContext.getResourceAsStream(). (B) is true - server-side code has full access. (C) is true - clients cannot directly access /WEB-INF contents. (D) is true - /WEB-INF is the standard location for .tld files. The correct answers are B, C, D.
-
Java Visual Mode
-
Java Virtual Machine
-
Java Virtual Manual
-
Java View Mode
B
Correct answer
Explanation
JVM stands for Java Virtual Machine, which is the execution engine that runs Java bytecode by providing a runtime environment. It's not a visual mode, manual, or view mode - it's the fundamental component that enables Java's platform independence by abstracting the underlying hardware.
-
cd /Utils/companyx/inbound/postToERP
-
cd /invoke/companyx.inbound/postToERP
-
cd /ns/companyx/inbound/postToERP
-
cd /ns/companyx.inbound/postToERP
C
Correct answer
Explanation
In webMethods Integration Server, the namespace (ns) virtual directory is used to access services via FTP. The correct path syntax to navigate to a service in a package is cd /ns/ followed by the folder path and service name, which is /ns/companyx/inbound/postToERP.
-
Primitive Data Types
-
Simple Data Types
-
Complex Data Types
-
IS schemas may not be edited
B
Correct answer
Explanation
In webMethods Developer, when creating Integration Server schemas from XML documents, you can edit Simple Data Types to apply constraints or facets. Complex types represent structural elements derived from the XML schema and cannot be directly modified in the same way.
-
Web-browsers only
-
Multi-threaded Java clients only
-
FTP clients only
-
COM+ Clients only
-
Web Controller
-
Performance Online
-
Performance Center
-
Load Runner Controller v.9.x
C
Correct answer
Explanation
Performance Center is the web-based version of LoadRunner Controller. It provides a browser-based interface for managing and monitoring load tests, whereas the traditional Controller requires a desktop client installation.
-
Application Server
-
Web Server
-
Database Server
-
Messaging Server
B
Correct answer
Explanation
Apache is a web server software that serves web content over HTTP/HTTPS. It's the most widely used web server software, not an application server, database server, or messaging server.
-
Starts Apache in verbose mode with maximum logging.
-
Has no impact on Apache and has been discontinued as of Apache 1.2.6.
-
Displays the version of Apache and the build date and exits.
-
Disables virtual hosting for the specified virtual host name.
C
Correct answer
Explanation
In Apache HTTP Server, running the executable with the -v option prints the version of the Apache server and its build date, and then immediately exits without starting the daemon.
-
null
-
Primary Key class
-
Home Object
-
Remote Object
A
Correct answer
Explanation
For CMP (Container-Managed Persistence) entity beans, the container handles primary key generation, so ejbCreate() returns null. In BMP (Bean-Managed Persistence), ejbCreate() returns the primary key.
-
The Session is not valid in the new Window
-
The Session is valid in the new Window
-
The Scope is not valid in the new Window
-
The Scope is valid in the new Window
B
Correct answer
Explanation
When a new window is opened from an existing page via a link or script, the browser sends the same session cookie (JSESSIONID) in the request headers. Thus, the session remains valid and shared in the new window.
-
getServletInfo()
-
getInitParameters()
-
getServletConfig()
-
None of the above
C
Correct answer
Explanation
The getServletConfig() method is inherited from GenericServlet and returns the ServletConfig object passed to the init method, allowing access to initialization parameters and the servlet context.