04 through through progressive maven Response codes implemented

    @Override 
protected void doGet (REQ the HttpServletRequest, HttpServletResponse RESP) throws ServletException, IOException {
// how to get five seconds to refresh the browser
resp.setHeader ( "Refresh", "3");
// create a picture in memory
BufferedImage image the BufferedImage new new = (80, 20 is, BufferedImage.TYPE_INT_RGB);
// get the picture
the Graphics2D G = (the Graphics2D) image.getGraphics ();
// set the background color image
g.setColor (Color.white);
g.fillRect (0 , 0,80,20);
// write data to the picture
g.setColor (Color.BLUE);
g.setFont (new new the Font (null, Font.BOLD, 20));
g.drawString (makeNum (), 0, 20);
// tell the browser that requests to open with a picture of the way
Surely return; }

















Guess you like

Origin www.cnblogs.com/huhao2000/p/11939901.html