Client Pull Servlet - Request Pages Automatically
The purpose of this assignment was to:
- Learn about the client pull technique.
The description and my solution of the Client Pull Servlet -assignment can be viewed and/or downloaded at the bottom of this page.
How does the Client Pull Technique work?
"Client pull" refers to a technique that enables clients such as Web browsers to request pages(pull pages) from the server automatically without user intervention. This is usually done by the use of a refresh header.
Snippet from the servlet code that demonstrates how to set a page to refresh every second:
response.setHeader("Refresh","1")
response in the code above is an instance of the HttpServletResponse class.
Client pull can also be accomplished statically by simply using a meta element in the head section of a HTML document, like this:
<meta http-equiv="refresh" content="5" />
This way the client will pull a page from a server every 5 second.
Assignment Description
Create a servlet that make use of the client pull technique. Each response on the clients automated requests should be unique.
