1 4 package com.tc.server; 5 6 import com.tc.util.ProductInfo; 7 8 import java.io.IOException ; 9 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, HttpServletResponse response) throws IOException { 17 ProductInfo productInfo = ProductInfo.getThisProductInfo(); 18 19 PrintWriter 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 |