49 |
|
|
50 |
protected String doLookup(String appId) throws IOException { |
protected String doLookup(String appId) throws IOException { |
51 |
MemcachedClient c = new MemcachedClient(new InetSocketAddress("localhost", 11211)); |
MemcachedClient c = new MemcachedClient(new InetSocketAddress("localhost", 11211)); |
|
c.flush(); |
|
52 |
|
|
53 |
|
|
54 |
String key = "marketstats:" + appId; |
String key = "marketstats:" + appId; |
151 |
|
|
152 |
protected void doGet(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException { |
protected void doGet(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException { |
153 |
String appId = request.getParameter("appId"); |
String appId = request.getParameter("appId"); |
154 |
|
|
155 |
|
response.setContentType("text/html"); |
156 |
PrintWriter out = response.getWriter(); |
PrintWriter out = response.getWriter(); |
157 |
|
out.print( "<html><body><pre>" + doLookup(appId) + "</pre></body></html>" ); |
|
out.print( "<pre>" + doLookup(appId) + "</pre>" ); |
|
158 |
} |
} |
159 |
|
|
160 |
} |
} |