1 4 5 9 10 package org.openlaszlo.servlets.responders; 11 12 import java.io.*; 13 import java.util.Properties ; 14 import javax.servlet.ServletConfig ; 15 import javax.servlet.ServletException ; 16 import javax.servlet.ServletOutputStream ; 17 import javax.servlet.http.HttpServletRequest ; 18 import javax.servlet.http.HttpServletResponse ; 19 import org.openlaszlo.utils.FileUtils; 20 import org.apache.log4j.Logger; 21 22 public final class ResponderERRORCOUNT extends ResponderAdmin 23 { 24 private static Logger mLogger = Logger.getLogger(ResponderERRORCOUNT.class); 25 26 protected void respondAdmin(HttpServletRequest req, HttpServletResponse res) 27 throws IOException 28 { 29 ServletOutputStream out = res.getOutputStream(); 30 try { 31 res.setContentType ("text/xml"); 32 out.println("<lps-errorcount>" + Responder.getErrorSWFCount() + "</lps-errorcount>"); 34 if (req.getParameter("clear") != null) { 35 Responder.clearErrorSWFCount(); 36 mLogger.debug("Cleared error count"); 37 } 38 } finally { 39 FileUtils.close(out); 40 } 41 } 42 43 public int getMimeType() 44 { 45 return MIME_TYPE_XML; 46 } 47 } 48 | Popular Tags |