finish transmission from javascript to java