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

  2. Deployment Desciptor

  3. Navigation

  4. Component

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

The deployment descriptor is an XML file that contains configuration information for J2EE components. It describes how the application should be deployed, including settings for servlets, EJBs, security roles, and resource references. The descriptor allows the application assembler and deployer to customize the application without modifying source code.

Multiple choice technology web technology
  1. Application Client

  2. Applet

  3. Web

  4. EJB

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

Applets run within a browser sandbox and are subject to strict security restrictions. They cannot directly access databases or other resources on the client or server for security reasons. Application clients, web components, and EJBs can all access databases when properly configured, making applet the only component that generally cannot.

Multiple choice technology web technology
  1. JMS

  2. Java IDL

  3. JDBC

  4. JAF

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

Java IDL (Interface Definition Language) allows Java applications to invoke external CORBA objects using the IIOP (Internet Inter-ORB Protocol). It provides interoperability between Java and CORBA-based systems. JDBC is for databases, JMS for messaging, and JAF for data type handling.

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. Session Facade

  2. Builder

  3. Business Delegate

  4. Decorator Pattern

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

The Business Delegate pattern reduces network performance issues by adding a layer between the presentation tier and business services. It encapsulates service lookup and exception handling, minimizing costly remote calls. Session Facade reduces EJB calls, Builder constructs objects, and Decorator adds behavior dynamically; none address the specific problem of business service invocation overhead.