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
-
Master Page
-
Page Class
-
Session Class
-
None of the Above
B
Correct answer
Explanation
All ASP.NET Web Forms inherit from the Page class (System.Web.UI.Page), which provides the base functionality for web pages including the request lifecycle, events, and common properties. Master Pages are used for shared layouts, and Session Class manages session state, not page inheritance.
-
Session objects
-
Application objects
-
ViewState
-
All the Above
D
Correct answer
Explanation
ASP.NET provides multiple state management mechanisms. Session objects store user-specific data, Application objects maintain global application state, and ViewState preserves page state across postbacks. All three are valid approaches.
-
JSP Implementation class file
-
JSP page Implementation class
-
JSP file Implementation class
-
JSP class Implementation file
A
Correct answer
Explanation
When a JSP (JavaServer Page) is compiled by the web container, it generates a Java class file that implements the servlet interface. This generated class is commonly referred to as the JSP Implementation class file. It contains the translated JSP code along with the servlet lifecycle methods.
-
Client information
-
Server information
-
Container information
-
Setup information
B
Correct answer
Explanation
Initialization parameters in Java EE and application servers are used to convey server information to the application developer. These parameters configure server-specific settings, connection pools, JNDI resources, and other server-side operational information that the application needs to know about.
-
Remote Interface
-
Bean Interface
-
Home Interface
-
Bean Class
C
Correct answer
Explanation
The Home Interface in EJB (Enterprise JavaBeans) defines the methods for creating, removing, and finding EJB objects of a specific type. It's the factory interface that clients use to obtain references to EJB objects. The Remote Interface defines business methods, the Bean Class contains the implementation, and the Bean Interface is not a standard EJB term.
-
JSP files,Class files for servlets
-
GIF and HTML files
-
Deployment Descriptor
-
All of above
D
Correct answer
Explanation
A web container contains all the resources required to run a web application, including JSP files, servlet class files, deployment descriptors (web.xml), and static assets like GIF and HTML files. Thus, all of the listed options are correct.
-
HttpServletRequest
-
HttpServletResponse
-
SessionContext
-
SessionConfig
A
Correct answer
Explanation
In Java EE servlets, the HttpServletRequest interface provides the getSession() method that returns the HttpSession object for the current request. HttpServletResponse is for sending responses, and SessionContext/SessionConfig are not standard servlet APIs for session retrieval.
-
CLR
-
CAS
-
Both A) and B)
-
None of the Above
B
Correct answer
Explanation
Code Access Security (CAS) is the .NET security mechanism that restricts what code can do based on permissions, preventing malicious or buggy code from performing dangerous operations like formatting the hard disk. CLR manages execution but doesn't enforce security boundaries.
-
PSAPPSRV.CFG
-
PSPRCS.CFG
-
PSNTSRV.CFG
-
PSAPPDOM.CFG
A
Correct answer
Explanation
PSAPPSRV.CFG is the master configuration file for a PeopleSoft application server domain. It contains all domain settings including connection parameters, server process counts, and domain characteristics. PSPRCS.CFG is for process scheduler, PSNTSRV.CFG doesn't exist as a standard file, and PSAPPDOM.CFG is not a valid configuration filename.
-
Namespace
-
Assembly
-
Reference
-
Object
A
Correct answer
Explanation
In web services (specifically using XML and WSDL), namespaces serve the same purpose as packages in programming languages - they organize elements and prevent naming conflicts. Namespaces uniquely identify elements in XML documents.
B
Correct answer
Explanation
By default, webMethods Integration Server's HTTP listener is configured on port 5555. This is a standard default port for webMethods Integration Server installations. Ports 4444, 4555, and 5000 are not the default HTTP ports for this server.
-
the page has only one form
-
the page has multiple forms and the developer is familiar with developing GUI appliciations
-
Java Script is not preferred
-
light weight web application is being developed
B
Correct answer
Explanation
JSF (JavaServer Faces) is a component-based framework ideal for complex pages with multiple forms and complex UI logic, especially when developers have GUI application experience. JSP is simpler and more suitable for lightweight applications with minimal form complexity. JSF provides better state management and event handling for complex interfaces.
A
Correct answer
Explanation
The Java Virtual Machine (JVM) is indeed the run-time system that executes Java bytecode. It provides the environment where Java programs run, handling memory management, garbage collection, and platform independence through the 'write once, run anywhere' principle.
-
Random Memory Interface
-
Remote Method Invocation
-
Random Method Invocation
-
Remote Memory Interface
B
Correct answer
Explanation
RMI stands for Remote Method Invocation, which allows Java objects running in one JVM to invoke methods on objects running in another JVM. This enables distributed Java applications where objects can communicate across different machines or processes.