KyaPoocha.com

Huge Collection of Interview Questions


Archive for August, 2006

What is preinitialization of a servlet? 

A container doesnot initialize the servlets ass soon as it starts up, it initializes a servlet when it receives a request for that servlet first time. This is called... Read more »

What is the difference between ServletContext and ServletConfig? 

ServletContext: Defines a set of methods that a servlet uses to communicate with its servlet container, for example, to get the MIME type of a file, dispatch requests,... Read more »

Explain ServletContext. 

ServletContext interface is a window for a servlet to view it’s environment. A servlet can use this interface to get information such as initialization parameters... Read more »

Explain the directory structure of a web application. 

The directory structure of a web application consists of two parts. A private directory called WEB-INF A public resource directory which contains public resource... Read more »

What is the difference between the getRequestDispatcher(String path) method of javax.servlet.ServletRequest interface and javax.servlet.ServletContext interface? 

The getRequestDispatcher(String path) method of javax.servlet.ServletRequest interface accepts parameter the path to the resource to be included or forwarded to,... Read more »

Explain the life cycle methods of a Servlet. 

The javax.servlet.Servlet interface defines the three methods known as life-cycle method. public void init(ServletConfig config) throws ServletException public void... Read more »

What is an Iterator interface? 

The Iterator interface is used to step through the elements of a Collection .  Read more »

What are transaction isolation levels in EJB? 

1. Transaction_read_uncommitted- Allows a method to read uncommitted data from a DB(fast but not wise). 2. Transaction_read_committed- Guarantees that the data you... Read more »

Can Entity Beans have no create() methods? 

Yes. In some cases the data is inserted NOT using Java application, so you may only need to retrieve the information, perform its processing, but not create your... Read more »

What is software architecture of EJB? 

Session and Entity EJBs consist of 4 and 5 parts respetively: 1. A remote interface (a client interacts with it), 2. A home interface (used for creating objects... Read more »

What are the callback methods in Entity beans? 

The bean class defines create methods that match methods in the home interface and business methods that match methods in the remote interface. The bean class also... Read more »

What are the methods of Entity Bean?What is the difference between Container-Managed Persistent (CMP) bean and Bean-Managed Persistent(BMP) ? 

Container-managed persistence beans are the simplest for the bean developer to create and the most difficult for the EJB server to support. This is because all the... Read more »

What are the methods of Entity Bean? 

An entity bean consists of 4 groups of methods: 1. create methods: To create a new instance of a CMP entity bean, and therefore insert data into the database, the... Read more »

Is there a way to execute a JSP from the comandline or from my own application? 

There is a little tool called JSPExecutor that allows you to do just that.  Read more »

What is the difference b/w variable declared inside a declaration part and variable declared in scriplet part? 

Variable declared inside declaration part is treated as a global variable.that means after convertion jsp file into servlet that variable will be in outside of service... Read more »

Page 3 of 16«12345»...Last »