252014Jul

Process Steps When We Deploy Any Web Application On Server

When we are creating and deploying any web application on server, the following tasks happened on server side. Step 1:- web.xml parsed by using SAX Parser and stores in to memory. Step 2:- ServletContext object will be created and initialized by sevletContext parameter specified in web.xml. <context-param>………</context-param> Step 3:- Thread Pool will be created. Step 4:- Servlet…

Read More
222014Jul

Difference between init() & init(ServletConfig)

Question-What’s the difference between init() & init(ServletConfig) and Which is better ? Answer- Before start we have to understand the servlet flow. For example you have servlet LoginServlet which extends HttpServlet public class LoginServlet extends HttpServlet{ } And your HttpServlet internally extends GenericServlet. public abstract class GenericServlet implements Servlet, ServletConfig, Serializable { public GenericServlet() {…

Read More