loading
onError
<html:view>
<ajax:function name="dados" url="/app/url/nao/existe" executeOnDocumentLoad="true">
    <ajax:onSuccess>
        
    </ajax:onSuccess>
    <ajax:onError>
         /*Nesse trecho está disponivel as variaveis javascript ( jqXHR jqXHR, String textStatus, String errorThrown )*/
         alert(textStatus);
         alert(errorThrown);
         alert(jqXHR);
    </ajax:onError>
</ajax:function>
</html:view>