private void writeInvalidVersion( String serverVersion, String clientVersion ) {
String errorMsg = "Incompatible Tabris Versions:\nClient " + clientVersion + " vs. Server " + serverVersion;
HttpServletResponse response = RWT.getResponse();
response.setStatus( SC_PRECONDITION_FAILED );
ProtocolMessageWriter writer = new ProtocolMessageWriter();
writer.appendHead( "error", JsonValue.valueOf( errorMsg ) );
try {
writer.createMessage().writeTo( response.getWriter() );
} catch( IOException exception ) {
throw new IllegalStateException( exception );
}
}