KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > com > tc > server > VersionServlet


1 /*
2  * All content copyright (c) 2003-2006 Terracotta, Inc., except as may otherwise be noted in a separate copyright notice. All rights reserved.
3  */

4 package com.tc.server;
5
6 import com.tc.util.ProductInfo;
7
8 import java.io.IOException JavaDoc;
9 import java.io.PrintWriter JavaDoc;
10
11 import javax.servlet.http.HttpServlet JavaDoc;
12 import javax.servlet.http.HttpServletRequest JavaDoc;
13 import javax.servlet.http.HttpServletResponse JavaDoc;
14
15 public class VersionServlet extends HttpServlet JavaDoc {
16   protected void service(HttpServletRequest JavaDoc request, HttpServletResponse JavaDoc response) throws IOException JavaDoc {
17     ProductInfo productInfo = ProductInfo.getThisProductInfo();
18
19     PrintWriter JavaDoc writer = response.getWriter();
20     writer.println("<html><title>Version Information</title><body><pre>");
21     response.getWriter().println(productInfo.toLongString());
22     writer.println("</pre></body></html>");
23   }
24 }
25
Popular Tags