@ Deprecated public Result renderRaw ( final String string ) { Renderable renderable = new Renderable ( ) { @ Override public void render ( Context context , Result result ) { if ( result . getContentType ( ) == null ) { result . contentType ( Result . TEXT_PLAIN ) ; } ResponseStreams resultJsonCustom = context . finalizeHeaders ( result ) ; try ( Writer writer = resultJsonCustom . getWriter ( ) ) { writer . write ( string ) ; } catch ( IOException ioException ) { logger . error ( "Error rendering raw String via renderRaw(...)" , ioException ) ; } } } ; render ( renderable ) ; return this ; }
This method directly renders the String to the output . It completely bypasses any rendering engine .