public void checkContentType ( final HttpServletRequest request ) { String reqpar = request . getParameter ( getContentTypeRequestName ( ) ) ; if ( reqpar != null ) { if ( reqpar . equals ( "!" ) ) { // Go back to unsticky content type setContentTypeSticky ( false ) ; } else { setContentType ( reqpar ) ; setContentTypeSticky ( false ) ; } } reqpar = request . getParameter ( getContentTypeStickyRequestName ( ) ) ; if ( reqpar != null ) { if ( reqpar . equals ( "!" ) ) { // Go back to unsticky content type setContentTypeSticky ( false ) ; } else { setContentType ( reqpar ) ; setContentTypeSticky ( true ) ; } } }
Allow user to explicitly set the content type .