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

Multiple choice
  1. Deployment descriptor

  2. EJB server provider

  3. Instance passivation

  4. TX_MANDATORY

  5. Deployer

Reveal answer Fill a bubble to check yourself
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.

Multiple choice
  1. Wait()

  2. Destroy()

  3. Dead()

  4. Both 1 and 3

  5. Both 1 and 2

Reveal answer Fill a bubble to check yourself
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.

Multiple choice
  1. Write Java wrapper classes to integrate the JavaBean into Forms.

  2. Use the FBEAN PL/SQL Package and its built-ins to register and invoke the JavaBeans.

  3. Add a special layer of Java code to register the properties and methods of the JavaBeans.

  4. He does not need to use any built-in package or write any code to integrate JavaBeans into forms.

Reveal answer Fill a bubble to check yourself
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.

Multiple choice
  1. One

  2. Two

  3. Three

  4. Unlimited

Reveal answer Fill a bubble to check yourself
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.

Multiple choice
  1. As a CGI script

  2. As an independent process

  3. By one of Tomcat's threads

  4. None of the above is correct

Reveal answer Fill a bubble to check yourself
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.

Multiple choice
  1. Java applet.

  2. Java servlet.

  3. Either 1 or 2 above.

  4. Neither 1 nor 2 above.

Reveal answer Fill a bubble to check yourself
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.

Multiple choice
  1. VBScript only

  2. Jscript only

  3. Java only

  4. All of the above are supported

Reveal answer Fill a bubble to check yourself
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.

Multiple choice
  1. Apache Tomcat

  2. Apache Web server

  3. Sun servlet processor

  4. None of the above is correct

Reveal answer Fill a bubble to check yourself
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.

Multiple choice
  1. A Java application

  2. A Java applet

  3. A Java servlet

  4. None of the above is correct

Reveal answer Fill a bubble to check yourself
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.

Multiple choice
  1. There are no public instance variables.

  2. All persistent values are accessed using getxxx and setxxx methods.

  3. It may have many constructors as necessary.

  4. All of the above are true of a Java bean.

Reveal answer Fill a bubble to check yourself
C Correct answer