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
-
Flex
-
JSP
-
Silver Light
-
Dot net
D
Correct answer
Explanation
Projectserver.nielsen.com uses Dot Net (Microsoft .NET) technology. This is consistent with Microsoft-based enterprise project management systems. Flex (A) and Silverlight (C) are RIA frameworks, not backend server technologies. JSP (B) is Java-based, while .NET is Microsoft's framework.
-
Clean separation of concerns between HTML and Java
-
Automated state management
-
conjunction with JSP and custom tag libraries
-
Abstraction away from Servlet API and HTTP protocol details
A,B,D
Correct answer
Explanation
Wicket's key benefits are: clean HTML/Java separation (pages are pure XHTML with minimal Wicket tags), automated state management (no manual HTTP session handling), and abstraction from Servlet/HTTP protocol details (developers work with Java components, not HTTP requests directly). Option C describes JSP/taglibs, which Wicket specifically avoids.
-
It is not particularly object-oriented.
-
You work with hierarchies of components and design your application as such.
-
Unless you output HTML directly from your Java code you still need to learn another major technology JSP plus custom tag libraries in order to produce output HTML pages.
-
A very clean object-oriented and component based approach.
A,C
Correct answer
Explanation
Struts is considered outdated because: (A) it's not truly object-oriented - Action classes are HTTP-driven rather than OO-designed; (C) it requires learning JSP and custom taglibs for HTML output. Options B and D incorrectly describe Struts - B mentions hierarchies (not a Struts strength) and D claims it's clean OO (which it is not).
-
Each Action class defines an abstraction, but the abstraction is determined by the HTTP procotol request mechanism rather than by an object-oriented analysis
-
Wicket is fully object-oriented. You work with hierarchies of components and design your application as such.
-
Wicket markup files are as close to pure HTML as it is possible to get. Where Wicket does introduce content into the markup it is very clean and complies with all XHTML standards
-
Wicket is based around intercepting each HTTP request to a web application and directing it to a specific Action class that handles the request
B,C
Correct answer
Explanation
Wicket solves Struts' problems by: (B) being fully object-oriented with component hierarchies, and (C) using pure HTML markup that complies with XHTML standards. Option A describes Struts' problem (Action classes tied to HTTP), and D describes Struts' architecture (not Wicket's).
B
Correct answer
Explanation
Wicket explicitly abstracts away Servlet API and HTTP protocol details. Developers work with Java components and models, while Wicket handles HTTP requests, sessions, and parameters behind the scenes. The statement claims Wicket does NOT hide these details, which is false.
C
Correct answer
Explanation
With Apache Wicket, developers get the benefits of Ajax functionality (partial page updates, dynamic content refresh) without writing raw JavaScript code. Wicket's Ajax-enabled components handle all the complex Ajax plumbing behind the scenes while you work with just Java and HTML. The correct answer is Ajax.
-
Its a protocol for calling services
-
Its a registry for discovering services
-
Its an xml file for defining the methods that can be called over the web.
-
None of the above
C
Correct answer
Explanation
WSDL (Web Services Description Language) is an XML-based language used to describe the public interface, operations, parameters, and access endpoints of a web service. SOAP is the protocol used to call them, and UDDI is used for discovery.
-
A Web service
-
A tool to generate Web services from java classes.
-
A tool to generate web service stubs.
-
All of the above.
B,C
Correct answer
Explanation
Apache Axis is primarily a tool for generating web services from Java classes (B) and for generating web service stubs/proxies (C). While Axis can work with web services (A), describing it as 'a web service' is not its primary definition - it's a framework/tool for creating and consuming web services. Option D 'All of the above' is incorrect because A is misleadingly worded.
-
Web Service Discovery Logic
-
Web Service Dynamic Link
-
Web Service Discovery Latency
-
Web Services Description Language
D
Correct answer
Explanation
WSDL (Web Services Description Language) is an XML-based language that describes the interface, operations, parameters, and location of a web service. It enables clients to understand how to invoke the service. The other options are not standard web service acronyms.
-
Mapping files
-
http.conf
-
XML Configuration hibernate.cfg.xml
-
web.config
A,C
Correct answer
Explanation
Hibernate configuration is typically defined using programmatic mapping files and XML configuration files like hibernate.cfg.xml. Config files like http.conf (Apache Web Server) and web.config (ASP.NET) are completely unrelated to Hibernate.
-
Session is a light weight non-threadsafe object
-
You can share the session between threads
-
Session represents a single unit-of-work with the database
-
Session is the primary interface for the persistence service
-
A session loads database connections using lazy-loading
B
Correct answer
Explanation
Hibernate Session objects are explicitly designed to be non-threadsafe. Each thread should have its own Session instance to prevent race conditions and data corruption. The Session is lightweight but must not be shared across threads.
-
Configuration interface
-
Session interface
-
Query and Criteria interfaces
-
User interface
A,B,C
Correct answer
Explanation
Configuration, Session, Query, and Criteria are core Hibernate interfaces used to establish settings, manage database connections, and run queries. The User interface is not part of Hibernate's core framework APIs.
-
Holds a mandatory (first-level) cache of persistent objects, used when navigating the object graph or looking up objects by identifier
-
Created during application initialization
-
Wraps a JDBC connection
-
Act as session Factory
C
Correct answer
Explanation
The Hibernate Session interface wraps a JDBC connection and provides methods for CRUD operations. It also holds a first-level cache and is created by SessionFactory (not during application initialization - that's when SessionFactory is created). The Session itself does not act as a factory.
-
Javax.servlet.Filter
-
Javax.servlet.FilterChain
-
Javax.servlet.FilterConfig
-
None of the above
A
Correct answer
Explanation
The Intercepting Filter pattern in Java EE is implemented by implementing the javax.servlet.Filter interface. This interface defines methods like init(), doFilter(), and destroy() that allow pre/post-processing of requests and responses. FilterChain and FilterConfig are supporting interfaces used by filters but are not the primary interface to implement.
-
javax.servlet.ServletConfig
-
javax.servlet.Servlet
-
javax.servlet.ServletContext
-
All of the above
B
Correct answer
Explanation
The Front Controller pattern is implemented by creating a servlet that implements the javax.servlet.Servlet interface (typically by extending HttpServlet). The servlet acts as a centralized entry point for all requests. ServletConfig and ServletContext are interfaces for configuration and context access, not for implementing the controller itself.