Hi,
in a existing spring mvc web project i want to check for some condition and then output generated html code instead of what would be shown normally, how is this possible?
Pretty much what in PHP would be:
i do have the ServletResponse on this point, so i was going for:Code:if ( $condition ) { die( '<html><body>denied</body></html>' ); }
But this does not seem to work (plus i don't know how to prevent the rest of the view to be displayed)Code:PrintWriter pw = response.getWriter(); pw.write( "Test" );
Any ideas?


Reply With Quote