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 general knowledge science & technology
  1. J2SE is the core Java language and APIs. J2EE is a collection of specifications for web-enabled development.

  2. they two entirely diffrent technology, nothing in common

  3. J2SE cant b used in web applications

  4. they are same

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

J2SE (Java 2 Standard Edition) is the core Java platform containing the base language, fundamental APIs, and runtime environment. J2EE (Java 2 Enterprise Edition) builds upon J2SE, adding specifications for enterprise features like web services, EJB, servlets, and database connectivity. They are not entirely different technologies - J2EE depends on J2SE - and J2SE can be used in web applications, but lacks enterprise-specific features.

Multiple choice general knowledge science & technology
  1. SCA/SCP

  2. SCJA/SCJP

  3. SCJB/SCJP

  4. None of the above

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

Sun Microsystems' Java certification hierarchy included SCJA (Sun Certified Java Associate) for entry-level knowledge and SCJP (Sun Certified Java Programmer) for core language proficiency before Java 7. Oracle acquired Sun in 2010 and rebranded these certifications to OCA (Oracle Certified Associate) and OCP (Oracle Certified Professional), but SCJA/SCJP were the original, widely-recognized names.

Multiple choice general knowledge
  1. J2EE Compatibility Test Suite

  2. J2EE Blueprints

  3. J2EE Specification

  4. J2EE reference implementation

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

J2EE Reference Implementation is the element that includes a fully functional J2EE server. J2EE Specification defines standards, Blueprints provide design patterns, and Compatibility Test Suite validates compliance - none include the actual server implementation.

Multiple choice general knowledge
  1. J2EE reference implementation

  2. Industry acceptance of C and C++

  3. Component reuse

  4. Interactive development environments

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

JavaBeans introduced the concept of reusable software components in Java, allowing developers to create self-contained components that could be visually manipulated in builder tools. This was a foundational step toward component-based development in Java. The other options don't align with JavaBeans' historical significance.

Multiple choice general knowledge
  1. Browser tier

  2. J2EE server tier

  3. Communications tier

  4. server tier

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

The J2EE application model is organized into tiers, with the J2EE server tier being the core where business logic and enterprise services execute. This tier hosts EJBs, servlets, and JSPs that process requests and manage application functionality.

Multiple choice general knowledge
  1. Applets

  2. HTML pages

  3. JSPs

  4. Server-side utility classes

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

JSPs (JavaServer Pages) are officially considered web components by the J2EE specification, along with Servlets. Applets run on the client side, HTML pages are static content, and server-side utility classes are supporting code - none of these qualify as web components in the specification.

Multiple choice general knowledge
  1. Authorization management

  2. Business logic

  3. Presentation logic

  4. Thread management

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

J2EE containers provide authorization management as a core service, handling security and access control for components. Business and presentation logic are implemented by developers in their code, and thread management is handled by the container but isn't a primary service exposed to components.

Multiple choice general knowledge
  1. Entity bean

  2. Stateless session bean

  3. Servlet

  4. Applet

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

A Servlet is the recommended J2EE component for use as a front controller in an MVC-based web application. Servlets provide the necessary HTTP request handling capabilities, can intercept and route requests, and are designed to coordinate between models and views. Entity beans are for data persistence, session beans for business logic, and applets run client-side.

Multiple choice general knowledge
  1. JDBC

  2. JMS

  3. JTA

  4. JTS

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

JMS (Java Message Service) enables distributed communication between J2EE components through asynchronous messaging. JDBC is for database connectivity, JTA for transaction management, and JTS is the transaction service implementation - these don't provide inter-component communication.

Multiple choice general knowledge
  1. JBoss

  2. IIS

  3. Jetty

  4. Apache Tomcat

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

This question tests knowledge of web/application servers. IIS (Internet Information Services) is Microsoft's proprietary web server software, while JBoss, Jetty, and Apache Tomcat are all Java-based application servers that are open source or have open source versions. IIS is the odd one out as it's Windows-specific and not Java-based.

Multiple choice general knowledge science & technology
  1. close

  2. init

  3. destroy

  4. service

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

The servlet lifecycle has three core methods defined in the Servlet interface: init() (called once during initialization), service() (called for each request to process client requests), and destroy() (called once before removal). These methods manage the servlet's creation, request handling, and cleanup. The close() method is not part of the standard servlet API.

Multiple choice general knowledge science & technology
  1. javax.http

  2. jaxax.http.servlet

  3. javax.servlet.http

  4. javax.servlet

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

GenericServlet is an abstract class in the javax.servlet package that implements the Servlet interface and provides basic functionality for protocol-independent servlets. It serves as the foundation for HttpServlet, which is in javax.servlet.http and handles HTTP-specific operations. The package javax.http does not exist in Java EE.

Multiple choice general knowledge science & technology
  1. SinglethreadModel

  2. SingleThreadedModel

  3. SingleThreadModel

  4. SingleThreadmodel

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

The SingleThreadModel interface in the Servlet API ensures thread safety by guaranteeing that the servlet handles only one request at a time. The servlet container either serializes requests through the servlet or maintains a pool of servlet instances. Options A, B, and D have incorrect spelling/casing - the actual interface name is SingleThreadModel (with capital T, capital M, no 'ed').

Multiple choice general knowledge science & technology
  1. Servlet

  2. ServletContext

  3. ServletConfig

  4. ServletInit

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

ServletConfig provides access to a servlet's initialization parameters defined in web.xml using getInitParameter(). ServletContext is for application-wide parameters (accessed via context-param), Servlet is the base interface, and ServletInit is not a valid interface. Each servlet gets its own ServletConfig object during initialization.

Multiple choice general knowledge science & technology
  1. getRequestDispatcher("www.google.com").forward(req,resp);

  2. getRequestDispatcher("www.google.com").include(req,resp);

  3. resp.include(req,resp);

  4. resp.forward(req,resp)

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

The include() method from RequestDispatcher performs dynamic inclusion - it includes the response from another resource during request processing. forward() transfers control completely, and HttpServletResponse doesn't have include/forward methods that take request/response directly. Dynamic inclusion generates content at runtime.