java - can we process a view for a bad request? -


i'm unable render form error message if request bad using spring controller , jquery-ajax jsp page.

if response code 200 i'm able see page not other response codes.

please code snippets '

 /* jsp page */    statuscode: {        200: function(response) {             $("#${tablediv}").empty();             $("#${tablediv}").html(response);        },        400 :function(response){             showerrormessage("oops! donor code assigned");            $("#${adddonorcodeform}").empty();                                            $("#${adddonorcodeform}").html(response); //can't load response here               }    } 

/*spring controller snippet *?

 if (result.haserrors()) {                   modelandview.setviewname("donors/donorcodes/adddonorcodeform");                   modelandview.addobject("adddonorcodeform",form);                             response.setstatus(httpservletresponse.sc_bad_request);               return modelandview;                   } 

can suggest me idea processing view bad requests.


Comments

Popular posts from this blog

how to proxy from https to http with lighttpd -

android - Automated my builds -

python - Flask migration error -