01: /*
02: * All content copyright (c) 2003-2006 Terracotta, Inc., except as may otherwise be noted in a separate copyright notice. All rights reserved.
03: */
04: package com.tc.server;
05:
06: import com.tc.util.ProductInfo;
07:
08: import java.io.IOException;
09: import java.io.PrintWriter;
10:
11: import javax.servlet.http.HttpServlet;
12: import javax.servlet.http.HttpServletRequest;
13: import javax.servlet.http.HttpServletResponse;
14:
15: public class VersionServlet extends HttpServlet {
16: protected void service(HttpServletRequest request,
17: HttpServletResponse response) throws IOException {
18: ProductInfo productInfo = ProductInfo.getInstance();
19:
20: PrintWriter writer = response.getWriter();
21: writer
22: .println("<html><title>Version Information</title><body><pre>");
23: response.getWriter().println(productInfo.toLongString());
24: writer.println("</pre></body></html>");
25: }
26: }
|