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 beans
-
Java applet
-
Session bean
-
Java servlets
-
Websphere
C
Correct answer
Explanation
A session bean is not shared, it means that it may have just one client.
-
Home interface
-
Remote interface
-
Bean managed persistence
-
ContainerHeader(java.lang.String name)
-
Events
A
Correct answer
Explanation
It extends javax.ejb.EJBHome, which in turn extends java.rmi.Remote.
-
Deployment descriptor
-
Enterprise java beans architecture
-
EJB server provider
-
Instance pooling
-
TX_MANDATORY
B
Correct answer
Explanation
The enterprise java beans architecture will address the development, deployment and runtime aspects of an enterprise application's life cycle.
-
Deployment descriptor
-
EJB server provider
-
Instance passivation
-
TX_MANDATORY
-
Deployer
E
Correct answer
Explanation
It is responsible for mapping the security roles defined by the application assembler to the user groups and accounts that exist in the operational environment in which the enterprise beans are deployed.
-
Stateful session bean
-
Java beans
-
Java applet
-
Java servlets
-
Stateless session bean
E
Correct answer
Explanation
When a client invokes the method of a stateless bean, the bean's instance variables may contain a state, but only for the duration of the invocation.
-
Wait()
-
Destroy()
-
Dead()
-
Both 1 and 3
-
Both 1 and 2
B
Correct answer
Explanation
This is the correct option because destroy() method is invoked when browser exits normally to inform the applet that is no longer needed and should release any recourses allocated.So this is the correct method. Hence this is correct choice according to the question asked.
-
Write Java wrapper classes to integrate the JavaBean into Forms.
-
Use the FBEAN PL/SQL Package and its built-ins to register and invoke the JavaBeans.
-
Add a special layer of Java code to register the properties and methods of the JavaBeans.
-
He does not need to use any built-in package or write any code to integrate JavaBeans into forms.
B
Correct answer
Explanation
The FBEAN package is Oracle Forms' built-in interface for communicating with JavaBeans. It provides PL/SQL built-ins to register JavaBeans, set/get properties, and invoke methods. Using FBEAN eliminates the need to write custom Java wrapper code or implement custom integration layers - it's the standard, supported mechanism for Forms-JavaBean interaction.
-
JAVA SE(Standard Edition)
-
JAVA ME(Micro edition)
-
JAVA EE(Enterprise Edition)
-
All of the above
-
None of these
C
Correct answer
Explanation
JAVA EE contains JDBC,Servlets,JSP, etc.
A
Correct answer
Explanation
Tomcat maintains only a single instance of each JSP page in memory at any given time. This single instance is then used to serve multiple requests concurrently through different threads, ensuring memory efficiency while handling simultaneous users.
-
As a CGI script
-
As an independent process
-
By one of Tomcat's threads
-
None of the above is correct
C
Correct answer
Explanation
Tomcat executes JSP pages using threads from its thread pool rather than spawning separate processes or using CGI. When a JSP is requested, Tomcat uses one of its worker threads to execute the compiled servlet (which is what a JSP becomes after compilation), making it much more efficient than CGI scripts or separate processes.
-
Java applet.
-
Java servlet.
-
Either 1 or 2 above.
-
Neither 1 nor 2 above.
B
Correct answer
Explanation
JSP pages are translated into Java servlets by the JSP container. The servlet is then compiled into bytecode and executed by the server. This transformation happens automatically the first time the JSP is accessed or when it's modified. Options A is incorrect because applets run on the client side, not the server.
-
VBScript only
-
Jscript only
-
Java only
-
All of the above are supported
C
Correct answer
Explanation
JSP uses Java as its primary server-side scripting language. While JavaScript may appear in client-side code within JSP pages, the server-side scriptlets and expressions must be written in Java. Options A and B are Microsoft technologies not used in JSP, and D is incorrect because JSP does not support VBScript or JScript.
-
Apache Tomcat
-
Apache Web server
-
Sun servlet processor
-
None of the above is correct
A
Correct answer
Explanation
Apache Tomcat is the servlet container developed jointly by Apache Foundation and Sun Microsystems (now Oracle). It implements Java servlet and JSP specifications. The Apache Web server (option B) serves static content and is not a servlet processor, and there is no official 'Sun servlet processor' product.
-
A Java application
-
A Java applet
-
A Java servlet
-
None of the above is correct
C
Correct answer
Explanation
Java servlets run on the web server and respond to HTTP requests. They are the server-side counterpart to applets. Option A is incorrect because standalone Java applications aren't invoked via HTTP, and B is wrong because applets run client-side in browsers, not on servers.
-
There are no public instance variables.
-
All persistent values are accessed using getxxx and setxxx methods.
-
It may have many constructors as necessary.
-
All of the above are true of a Java bean.