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
  1. True

  2. False

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

Servlets use a multi-threaded model where a single servlet instance handles multiple requests concurrently. Each request runs in a separate thread, sharing the same servlet instance, which makes resource-efficient but requires thread-safe coding.

Multiple choice technology
  1. Java Server Pages

  2. Java Server Programming

  3. Java Service Pages

  4. Java Service Programming

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

JSP stands for Java Server Pages. It is a server-side technology that allows developers to embed Java code in HTML pages to create dynamic web content.

Multiple choice technology
  1. To make controller

  2. To make GUI

  3. In writing business logic

  4. Deprecated

  5. none

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

JSP is primarily used for creating the view/presentation layer (GUI) in web applications. It generates HTML that is sent to the browser. Controllers are better implemented as Servlets, and business logic should be in separate Java classes.

Multiple choice technology
  1. Apache Tomact

  2. Bea WebLogic

  3. Servlets

  4. JSP Engine

Reveal answer Fill a bubble to check yourself
A,B,D Correct answer
Explanation

JSP requires a servlet container or engine with JSP support to run. Apache Tomcat and Bea WebLogic are application servers/servlet containers. JSP Engine is the generic component that processes JSP. Servlets are Java classes that run inside containers, not platforms themselves.

Multiple choice technology
  1. A full-featured Web Application Server

  2. It provides supports to the Servlet and JSP

  3. . It includes pooled database access for DB2 and Oracle Relational Databases

  4. Provide support for EJB .

Reveal answer Fill a bubble to check yourself
A,B,C,D Correct answer
Explanation

IBM WebSphere is a full-featured Java EE application server that supports Servlets, JSP, and EJBs. It includes enterprise features like pooled database access for major databases (DB2, Oracle) and is a comprehensive platform for enterprise Java applications.

Multiple choice technology
  1. page, request, session, application

  2. Page, response, session, application

  3. Page, request, response, session

  4. None

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

JSP has four standard scopes: page (default), request, session, and application. Response is not a scope - it's an object for sending data back to the client. Scopes determine the lifespan and visibility of data.

Multiple choice technology
  1. useBean

  2. setProperty

  3. getProperty

  4. All

  5. none

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

In JSP, there are three standard JavaBean actions: useBean (to instantiate or locate a bean), setProperty (to set bean property values), and getProperty (to retrieve bean property values). Option D 'All' correctly identifies that useBean, setProperty, and getProperty are all JavaBean actions.

Multiple choice technology
  1. id and scope

  2. class or beanName,name,property,value.

  3. type and id

  4. name and property

  5. None

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

The jsp:getProperty action requires exactly two attributes: 'name' (the bean identifier matching the useBean id) and 'property' (the specific property name to retrieve). Option D correctly identifies these two required attributes. Options A, B, and C list incorrect attribute combinations.

Multiple choice technology
  1. Save the report to a reporting folder

  2. Save the report to the data directory

  3. Save the report on the TM1 Server

  4. Save the report to an application folder

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

To distribute formatted reports through a web browser in TM1, the report must be saved to an application folder. This makes it accessible through the TM1 Web interface. Reporting folders, data directory, and TM1 Server locations are not correct for web distribution.

Multiple choice technology architecture
  1. void setContext()

  2. void ejbLoad()

  3. void ejbDelete()

  4. void ejbEvict()

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

In EJB (Enterprise JavaBeans), ejbLoad() is a callback method specific to Entity beans that is invoked by the container to synchronize the bean's state with the underlying database. This method is called when the container needs to refresh the entity bean's state from persistent storage.

Multiple choice technology architecture
  1. EntityBean

  2. StatefulSession Bean

  3. MessageDrivenBean

  4. StatelessSessionBean

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

MessageDrivenBeans in EJB cannot have local or remote interfaces because they are designed to process asynchronous messages via JMS (Java Message Service). Unlike session or entity beans, MessageDrivenBeans are implemented as message listeners and are not intended for direct client invocation through business interfaces.

Multiple choice technology architecture
  1. construction

  2. destruction

  3. activation

  4. passivation

  5. All the above

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

Stateful session beans in EJB undergo all these lifecycle transitions: construction (when created), destruction (when removed), activation (when restored from secondary storage), and passivation (when temporarily serialized). These callbacks allow the bean to manage its state through the complete lifecycle.