Home » Interview Tips » How to Dress for Success?
 

Sep
2008

What are ear, war and jar files? What are J2EE Deployment Descriptors?

ear, war and jar are standard application deployment archive files. Since they are a standard, any application server will know how to unpack and deploy them.

An EAR file is a standard JAR file with an ".ear" extension, named from Enterprise Archive file.

Apr
2008

What are the differences between static and a dynamic include?

Static include <%@ include %> :
During the translation or compilation phase all the included JSP pages are compiled into a single Servlet.

Dynamic include <jsp:include …..>:
The dynamically included JSP is compiled into a separate Servlet.

Apr
2008

What are the main elements of JSP? What are scriplets? What are expressions?

There are two types of data in a JSP page.

1. Static part (ie HTML, CSS etc), which gets copied directly to the response by the JSP Engine.
2. Dynamic part, which contains anything that can be translated and compiled by the JSP Engine.

Apr
2008

What is a filter, and how does it work?

A filter dynamically intercepts requests and responses to transform or use the information contained in the requests or responses but typically do not themselves create responses. Filters can also be used to transform the response from the Servlet or JSP before sending it back to client.

Apr
2008

What is the difference between forwarding a request and redirecting a request?

REDIRECT:
Sends a header back to the browser, which contains the name of he resource to be redirected to. The browser will make a fresh equest from this header information. Need to provide absolute URL path.

Apr
2008

What are transactional attributes?

EJB transactions are a set of mechanisms and concepts, which insures the integrity and consistency of the database when multiple clients try to read/update the database simultaneously.

Transaction attributes are defined at different levels like EJB (or class), a method within a class or segment of a code withi

Apr
2008

What are the implicit services provide by an EJB container?

Lifecycle Management: Individual enterprise beans do not need to explicitly manage process allocation,
thread management, object activation, or object destruction.

Apr
2008

How does an EJB interact with its container and what are the call-back methods in entity beans?

EJB interacts with its container through the following mechanisms

Call-back Methods: Every EJB implements an interface (extends EnterpriseBean) which defines several
methods which alert the bean to various events in its lifecycle.

Apr
2008

Can an EJB client invoke a method on a bean directly?

An EJB client should never access an EJB directly. Any access is done through the container. The container will intercept the client call and apply services like transaction, security etc prior to invoking the actual EJB. This relationship between the EJB and the container is like "don't call us, we will call you".