question: public static void createResponse ( HttpServletRequest request , HttpServletResponse response , HttpServlet servlet , Properties cookieProperties , MobileDoc doc , boolean debug ) throws IOException { response . setHeader ( "Cache-Control" , "no-cache" ) ; response . setContentType ( "text/html; charset=UTF-8" ) ; if ( cookieProperties != null ) { Cookie cookie = new Cookie ( MobileEnv . COOKIE_INFO , propertiesEncode ( cookieProperties ) ) ; cookie . setComment ( "(c) adempiere, Inc - Jorg Janke" ) ; cookie . setSecure ( false ) ; cookie . setPath ( "/" ) ; if ( cookieProperties . size ( ) == 0 ) cookie . setMaxAge ( 0 ) ; else cookie . setMaxAge ( 2592000 ) ; response . addCookie ( cookie ) ; } if ( debug && MobileEnv . DEBUG ) { MobileEnv . addFooter ( request , response , servlet , doc . getBody ( ) ) ; } PrintWriter out = response . getWriter ( ) ; doc . output ( out ) ; out . flush ( ) ; if ( out . checkError ( ) ) log . log ( Level . SEVERE , "error writing" ) ; out . close ( ) ; }
target:  Create Standard Response Header with optional Cookie and print document. D:\j2sdk1.4.0\docs\guide\intl\encoding.doc.html