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
-
an out of memory error on the client
-
a SOAP fault
-
communication failure due to network error
-
incorrect configuration of stubs
B,C
Correct answer
Explanation
RemoteException occurs when a remote method invocation fails. A SOAP fault from a web service translates to a RemoteException in Java clients. Network communication failures during remote calls also trigger RemoteException. Out of memory errors cause runtime exceptions like OutOfMemoryError, not RemoteException. Stub configuration errors cause compilation or initialization exceptions, not RemoteException.
-
Master Page
-
Page Class
-
Session Class
-
None of the Above
B
Correct answer
Explanation
All Web forms in ASP.NET inherit from the Page class, which is the base class that provides core functionality for server-side processing, rendering, and lifecycle management. The Page class is part of the System.Web.UI namespace and serves as the foundation for all web pages. Master Pages inherit from Page, not the other way around.
-
Session.Dump
-
Session.Abandon
-
Session.Exit
-
None of the Above
B
Correct answer
Explanation
In ASP.NET, Session.Abandon is used to end the current session and release its resources. This method cancels the session and allows the session state to be garbage collected. Dump and Exit are not valid methods on the Session object - Abandon is the correct method for session termination.
-
Server.Transfer
-
Response.Redirect
-
Both A) and B)
-
None of the Above
A
Correct answer
Explanation
Server.Transfer transfers execution directly to another page on the server side without requiring a round-trip to the client. It preserves the original URL and does not trigger a new HTTP request. Response.Redirect sends a 302 response to the client, causing a new request, which is slower and changes the URL.
-
restartcicsmail.properties
-
schedule.xml
-
environment.properties
-
restart_genesys.ksh
A
Correct answer
Explanation
The restartcicsmail.properties file contains ID details of Genesys Q-listeners running on the server, including listener IDs, ports, and connection parameters. This properties file is used to manage and restart Q-listeners.
A
Correct answer
Explanation
xPression (often associated with document composition and content management) is indeed designed with a component-based SOA architecture. It integrates with multiple technology stacks including J2EE (Java), Web Services, JMS (Java Message Service), Microsoft .NET framework, and XML for data interchange.
-
Service to store per-user data throughout session.
-
Service to store per-user data accross sessions i.e. persistently
-
Home page in your web application
-
Menu page in your web application
B
Correct answer
Explanation
The Profile service in ASP.NET provides persistent per-user data storage that persists across multiple sessions, unlike session state which is temporary. It allows storing user-specific preferences and data that survives session expiration. Options C and D are unrelated.
-
Business Delegate
-
Model View Controller
-
Fast Lane Reader
-
View Helper
A
Correct answer
Explanation
The Business Delegate pattern reduces coupling between the presentation tier (Web) and business logic tiers by acting as an intermediary. It hides the complexity of business service lookup and exception handling, providing a clean interface to the web layer. This creates a loose coupling between tiers.
-
ApplicationContext Module
-
AOP Module
-
Core Container Module
-
DAO Module
C
Correct answer
Explanation
The Core Container Module is the foundation of the Spring Framework, providing essential functionality like IoC (Inversion of Control) and dependency injection. BeanFactory, the heart of this module, manages bean configuration and lifecycle. Other modules like AOP, DAO, and ApplicationContext build on this core foundation.
-
Application Context Module
-
AOP Module
-
Core Container Module
-
DAO Module
A
Correct answer
Explanation
The ApplicationContext module extends BeanFactory and adds enterprise features: internationalization (I18N), event publication, resource loading, and validation. This is what makes Spring a complete framework rather than just an IoC container.
-
Application Context Module
-
AOP Module
-
Core Container Module
-
DAO Module
B
Correct answer
Explanation
The AOP (Aspect-Oriented Programming) module enables aspect development for cross-cutting concerns like logging, transactions, security. It implements proxy-based AOP using JDK dynamic proxies or CGLIB.
-
It has access to a ServletConfig
-
It has access to a ServeletContext
-
It is only called once
-
It can be overridden
A,B,C,D
Correct answer
Explanation
The jspInit() method is called once during JSP initialization, has access to both ServletConfig and ServletContext (via config.getServletContext()), and can be overridden like other JSP lifecycle methods. All four statements are true.
-
stream
-
context
-
exception
-
application
C,D
Correct answer
Explanation
JSP implicit objects include exception (available in error pages) and application (representing ServletContext). 'stream' is not a valid implicit object, and 'context' should be 'application' - the actual implicit object name.
-
Both jspInit() and jspDestroy can be overridden
-
Only jspInit() can be overridden
-
Only jspDestroy() can be overridden
-
Only _jspService can be overridden
A
Correct answer
Explanation
Both jspInit() and jspDestroy() are JSP lifecycle methods that can be overridden to customize initialization and cleanup behavior. The _jspService method cannot be overridden as it's auto-generated by the container.
-
getPageContext()
-
findAttribute(String)
-
getAttribute(String, int)
-
getAttribute(String)
C
Correct answer
Explanation
The getAttribute(String, int) method is the most efficient way to access an attribute when you know its scope because it bypasses scope searching. The int parameter is a scope constant (APPLICATION_SCOPE, SESSION_SCOPE, REQUEST_SCOPE, PAGE_SCOPE) that directly accesses the specified scope. getAttribute(String) without scope parameter searches all scopes sequentially, while findAttribute() also searches scopes. getPageContext() returns the PageContext object itself, not the attribute value.