public void to ( WebContext context ) { HttpServletResponse response = context . response ( ) ; if ( ! mediaType . isEmpty ( ) ) { response . setHeader ( "Content-Type" , mediaType ) ; } if ( status > 0 ) { response . setStatus ( status ) ; } try { response . sendRedirect ( response . encodeRedirectURL ( url ) ) ; } catch ( IOException e ) { throw new UncheckedException ( e ) ; } }
Writes this HTTP response to the specified Web context .