Watch “Servlet Part-13 (Single Thread Model)” on YouTube

Single Thread Model:
It was designed to guarantee that only one thread is executed at a time in a given servlet instance’s service method.
It should be implemented to ensure that servlet can handle only one request at a time.

follow me @
https://raviroza.wordpress.com/
https://twitter.com/raviozaIT
https://www.facebook.com/ravi.oza.it
It is a marker interface and has no methods.
This interface is currently deprecated.
Once the interface is implemented the system guarantees that there’s never more than one request thread accessing a single instance of servlet.

OS : Windows 10
Jdk : Version 8
IDE : Eclipse Mars
Server : Apache Tomcat 7

follow me @
https://raviroza.wordpress.com/
https://twitter.com/raviozaIT
https://www.facebook.com/ravi.oza.it

Subscribe my channel to get latest video notification https://www.youtube.com/user/ravioza101

Watch “Servlet Part-12 (Servlet Collaboration)” on YouTube

Some times servlets have to cooperate, i.e. usually by sharing information.
This communication can be called as Sort Servlet collaboration.
The servlet, which are collaborating, can pass the shared information directly from one servlet to another. Request Dispatcher defines an object that receives requests from the client and sends them to any resource (such as a servlet, HTML file, or JSP file) on the server. The servlet container creates the RequestDispatcher object, which is used as a wrapper around a server resource located at a particular path or given by a particular name.

OS : Windows 10
Jdk : Version 8
IDE : Eclipse Mars
Server : Apache Tomcat 7

follow me @
https://raviroza.wordpress.com/
https://twitter.com/raviozaIT
https://www.facebook.com/ravi.oza.it

Subscribe my channel to get latest video notification https://www.youtube.com/user/ravioza101

Watch “Servlet Part-11 (Redirection in Servlet)” on YouTube

Servlet Redirection :

  • Local resource like servlet, jsp or html page etc.
  • Resource outside of our domain/application
  • Example of searching Google from out application

Servlet Redirection can be used to transfer/forward control to Local resource like servlet, jsp or html page etc., It can also used to transfer/forward the Resource outside of our domain/application. Here there is an example to transfer request from one servlet to anohter servlet when client request the first servlet. This example also demonstrate how it refers the another html page for redirection. And finally this example also demonstrate a trick to search Google directly from our application.

OS : Windows 10
Jdk : Version 8
IDE : Eclipse Mars
Server : Apache Tomcat 7

follow me @
https://raviroza.wordpress.com/
https://twitter.com/raviozaIT
https://www.facebook.com/ravi.oza.it

Subscribe my channel to get latest video notification https://www.youtube.com/user/ravioza101

Watch “Servlet Part-10 (Demo of Request Object Methods)” on YouTube

Demonstration of HttpRequest object methods, such as getRemoteAddr(), getRemoteHost(), getQueryString(), setAttribute(), getAttribute(), getAttributeNames(). To check all these method its is suggestible to create html/jsp page that will call/execute/request the servlet which will be using above methods.

OS : Windows 10
Jdk : Version 8
IDE : Eclipse Mars
Server : Apache Tomcat 7

follow me @
https://raviroza.wordpress.com/
https://twitter.com/raviozaIT
https://www.facebook.com/ravi.oza.it

Subscribe my channel to get latest video notification https://www.youtube.com/user/ravioza101

Watch “Servlet Part-9 (Enumeration to Read Headers and Parameters)” on YouTube

A request object of servlet consist the client information , such as client header information and client input parameters.
Here, Enumeration is used to read the values of client headers (list of headers) and to read the values of parameters (list of input parameters).

OS : Windows 10
Jdk : Version 8
IDE : Eclipse Mars
Server : Apache Tomcat 7

follow me @
https://raviroza.wordpress.com/
https://twitter.com/raviozaIT
https://www.facebook.com/ravi.oza.it

Subscribe my channel to get latest video notification https://www.youtube.com/user/ravioza101