//PrintWriter out = res.getWriter();
PrintWriter out = new PrintWriter(res.getOutputStream(), true);
// Fetch the page we're on.
String uri = req.getRequestURI();
// Get and increment the count for that page
int count = incrementAndGetCount(uri);
// Fulfull our purpose: print the count
out.println(count);