Servlets are small programs that run at server side and creates dynamic web pages. Servlets respond to requests sent by the user. In MVC architecture, servlets act as a controller. The controller processes and responds to user requests. The Servlet Life Cycle contains the following steps: Servlet Life Cycle: Class Loading The first step in …
Servlets Tutorials
Cookies In Servlet
Java EE Tutorials Servlets Tutorials Servlets Interview Questions Cookies are text data sent by server to the client and it gets saved at the client local machine. This is a small bits of information that a web browser send to browser and that are browser returns unchanged after visiting the same page. Server can accept multiple …
How To Get Client IP Address In Servlet
Java EE Tutorials Servlets Tutorials Servlets Interview Questions The host name and IP address of the client requesting the servlet can be obtained using the HttpRequest object. In the following section we have a detailed java code to get clients address in a servlet. If the client uses proxy server , the real request to …
Servlet Filter
Java EE Tutorials Servlets Tutorials Servlets Interview Questions Filter is an object that transforms the information of request or response from one format to another. The filter class is declared in the deployment class. The other types that can be implemented in a web application using filters is: Security verification. Session validation. Internationalization. Triggering resource …
Session Tracking Using Servlet
Java EE Tutorials Servlets Tutorials Servlets Interview Questions A session is a collection of HTTP request , over a period of time. A session is specific to the user and for each user a new session is created to track all the request from the user. In servlet session tracking can used to track the user …
Servlets Tutorials
Servlet is Java technology for writing the server side applications. It is the core technology used for developing any Java server applications. Any other Java frameworks created are internally using the servlet for hiding the complex part of how servlet handles the web application request and renders the response. However, knowing the internals of servlet …
Request Headers In Servlet
Java EE Tutorials Servlets Tutorials Servlets Interview Questions Request Header Request header is used to pass additional information about the request or itself to the server. Request header can be used by client to pass useful information. getHeaderNames() and getHeader() methods of javax.servlet.http.HttpServletRequest interface can be used to get the header information. Following important request header …
How To Refresh Servlet
Java EE Tutorials Servlets Tutorials Servlets Interview Questions We can refresh the server in two ways Through client side and another through server side. Consider the webpage containing the live score of the match or any live activities we want to see in web page in such cases we have to either refresh the web …