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

Multiple choice technology programming languages
  1. Applet

  2. Servlets

  3. Scriptlet

  4. Both b& c

Reveal answer Fill a bubble to check yourself
B Correct answer
Explanation

Servlets are Java programs that extend server capabilities, handling client requests and generating dynamic responses. They run within a web container and provide request/response processing functionality for Java-enabled web servers, making them ideal modular extensions.

Multiple choice technology programming languages
  1. HTTP Communication

  2. Socket Communication

  3. RMI Communication

  4. All the above

Reveal answer Fill a bubble to check yourself
D Correct answer
Explanation

Applets can communicate with servlets through multiple mechanisms. HTTP is the most common method using URL connections. Socket communication allows direct TCP/IP connections, and RMI enables Java-to-Java remote method calls. All three methods are valid for applet-servlet communication.

Multiple choice technology programming languages
  1. Displaying page data

  2. Connecting to database

  3. Routing Requests

  4. Performing front end validations

Reveal answer Fill a bubble to check yourself
C Correct answer
Explanation

In MVC architecture implemented with servlets, the Servlet acts as the Controller, receiving requests and routing them to appropriate Model components and View pages. The Controller handles request processing flow, not direct database connections, page display, or frontend validations which are handled by other components.

Multiple choice technology programming languages
  1. Home Interface

  2. Remote Interface

  3. Bean Class

  4. All the above

Reveal answer Fill a bubble to check yourself
D Correct answer
Explanation

Stateful session beans in EJB (Enterprise JavaBeans) architecture consist of three components: the Home Interface for lifecycle management, the Remote Interface for client access, and the Bean Class containing business logic.

Multiple choice technology programming languages
  1. ejbCreate()

  2. ejbPassivate(),

  3. ejbActivate()

  4. All the above

Reveal answer Fill a bubble to check yourself
D Correct answer
Explanation

Session beans have callback methods that the container invokes at specific lifecycle points. ejbCreate() is called when a bean instance is created. ejbActivate() is called when a passivated bean is activated (moved from secondary storage to memory). ejbPassivate() is called when a stateful session bean is passivated (moved to secondary storage to conserve resources). All three are valid callback methods.

Multiple choice technology programming languages
  1. Java Transaction Service

  2. Java Translation Service

  3. Java Transaction Servlet

  4. Java Translation Servlet

Reveal answer Fill a bubble to check yourself
A Correct answer
Explanation

JTS (Java Transaction Service) is the Java specification for transaction management. It defines the APIs and architecture for managing transactions across distributed systems in Java EE applications. The other options confuse 'Transaction' with 'Translation' or incorrectly identify it as a Servlet.

Multiple choice technology programming languages
  1. jspInit()

  2. jspDestroy()

  3. _jspService()

  4. None of the above

Reveal answer Fill a bubble to check yourself
C Correct answer
Explanation

In JSP, the _jspService() method is automatically generated by the container and is responsible for handling HTTP requests. It receives HttpServletRequest and HttpServletResponse objects as parameters, similar to the service() method in servlets. jspInit() is for initialization (no parameters), jspDestroy() is for cleanup (no parameters). Therefore, _jspService() is the correct answer.