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 web technology
  1. WAR

  2. JAR

  3. EAR

  4. RAR

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

EJB components are packaged as JAR (Java Archive) files, which contain the enterprise bean classes and deployment descriptors. The deployment descriptor (ejb-jar.xml) provides configuration information. WAR is for web components, EAR for complete applications, and RAR for resource adapters.

Multiple choice technology web technology
  1. WAR

  2. JAR

  3. EAR

  4. RAR

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

Web components (servlets, JSPs, HTML pages) are packaged as WAR (Web Application Archive) files. The WAR contains the web components, deployment descriptor (web.xml), and static content. JAR is for EJBs, EAR for complete applications, and RAR for resource adapters.

Multiple choice technology web technology
  1. WAR

  2. JAR

  3. EAR

  4. RAR

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

Application client modules are packaged as JAR files containing the client classes and deployment descriptor. The client can be a standalone Java application or a web-based client. WAR is for web components, EAR for complete applications, and RAR for resource adapters.

Multiple choice technology web technology
  1. Verify the content for J2EE specification, Configure the descriptor, Add EAR, Deploys the EAR file to J2EE server

  2. Configure the descriptor, Add EAR, Verify the content for J2EE specification, Deploys the EAR file to J2EE server

  3. Verify the content for J2EE specification,Add EAR, Configure the descriptor, Deploys the EAR file to J2EE server

  4. Add EAR, Configure the descriptor, Verify the content for J2EE specification, Deploys the EAR file to J2EE server

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

The correct installation sequence is: first add the EAR file to the server, then configure the deployment descriptor settings, verify the content meets J2EE specifications, and finally deploy. You must add the application before configuring its deployment settings, and verification should occur before actual deployment.

Multiple choice technology web technology
  1. message driven bean

  2. entity bean

  3. session bean

  4. page bean

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

Entity beans are designed for persistent data storage and automatically handle database operations. The container manages the underlying SQL and JDBC calls, allowing developers to work with Java objects instead of writing database code. Session beans handle business logic, message-driven beans process JMS messages.

Multiple choice technology packaged enterprise solutions
  1. HTTP

  2. HTTPS

  3. MQ Series

  4. FTP

  5. SFTP

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

The Webstation application utilizes IBM MQ Series (WebSphere MQ) for transactional and reliable asynchronous messaging to process and download quotes between different middleware systems, rather than direct file transfers (FTP/SFTP) or standard web protocols (HTTP/HTTPS).

Multiple choice technology web technology
  1. #{contextPath}

  2. #{requestContextPath}

  3. #{facesContext.externalContext.requestContextPath}

  4. ${request.contextPath}
Reveal answer Fill a bubble to check yourself
C Correct answer
Explanation

To solve this question, the user needs to know about JSF expressions and how they can reference an application's context path.

Option A: #{contextPath} - This option is not correct. There is no JSF implicit object named contextPath. This option seems to be a custom attribute, which is not defined in the JSF specification.

Option B: #{requestContextPath} - This option is not correct. There is no JSF implicit object named requestContextPath. This option seems to be a custom attribute, which is not defined in the JSF specification.

Option C: #{facesContext.externalContext.requestContextPath} - This option is correct. This expression references an application's context path using facesContext.externalContext.requestContextPath. This expression is used to get the application's context path that the current request is mapped to.

Option D: ${request.contextPath} - This option is not correct. This expression is not a JSF expression. It is a JSP expression that is used to get the context path of the current request.

Therefore, the correct answer is:

The Answer is: C. #{facesContext.externalContext.requestContextPath}

Multiple choice technology web technology
  1. Coustom Rule Engine

  2. Drools

  3. OpenRules

  4. JRuleEngine

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

The QuoteIt project uses Drools as its rule engine. Drools is a popular open-source rule engine for Java that implements the Rete algorithm for efficient rule processing. This is a specific project implementation detail rather than a general J2EE standard question. The other options (Custom Rule Engine, OpenRules, JRuleEngine) are not the correct choice for this project.

Multiple choice technology web technology
  1. MVC

  2. MVC2

  3. both

  4. none of them

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

Struts framework is based on the Model-View-Controller (MVC) architecture. MVC separates application logic into three interconnected components, promoting modular design and code reuse. The term 'MVC2' refers to a specific variation of MVC used in early Struts versions, but MVC is the fundamental architectural pattern Struts implements.

Multiple choice technology web technology
  1. to preprocess requests

  2. to post process responses

  3. to preprocess responses

  4. to preprocess and post process requests and responses

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

The Intercepting Filter pattern can handle both request preprocessing and response postprocessing. Filters intercept incoming requests before they reach the servlet (for tasks like authentication or logging) and can also modify outgoing responses after servlet processing (for tasks like compression or adding headers). This bidirectional capability makes it flexible for handling cross-cutting concerns.

Multiple choice technology web technology
  1. State full

  2. Stateless

  3. Both

  4. None

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

The Digital Office application uses stateless session beans. Stateless beans are more efficient for stateless operations as they don't maintain conversational state with clients and can be pooled. Stateful beans would be used only if client-specific state needs to be maintained across method calls.