java - HTTP Status 500 -


here ajax request:

$.getjson(..... + '/dashboard/searchdocumentsandcompanies.do',                             {q: ul.item.reqquery, resulttype: ul.item.resulttype},                             function (data) {                                 if (data.length == 0) {                                     data = [                                         {name: 'no matches found', resulttype: 'document', noresults: true}                                     ];                                 }                                 $.each(data, function (index, document) {                                     $(".textbox.ui-front li:eq(1)").after(function () {                                         return $("<li></li>").data("ui-autocomplete-item", ul.item).append(document.name).addclass('ui-menu-item');                                     });                                 });                             }); 

this controller:

 @responsebody     @requestmapping(value = "/searchdocumentsandcompanies.do", method = {requestmethod.get })     public list<searchresult> searchdocumentsandcompanies(@requestparam(value = "q", required = true) string querystring,                                                           @requestparam(value = "resulttype", required = false) string resulttype){         list<searchresult> data = null;         if(searchresulttype.document.getname().equals(resulttype)){             data = searchservice.findcompanyanddocuments(querystring); //test         }else{             data = searchservice.findcompanyanddocuments(querystring);         }         return data;     } 

when sending request on address works fine

http://localhost:8081/service/dashboard/searchdocumentsandcompanies.do?q=test

but on address responds 500 (internal server error)

http://localhost:8081/service/dashboard/searchdocumentsandcompanies.do?q=test&resulttype=document

any suggestions on doing wrong? if more code needed provide.


Comments

Popular posts from this blog

How has firefox/gecko HTML+CSS rendering changed in version 38? -

android - CollapsingToolbarLayout: position the ExpandedText programmatically -

Listeners to visualise results of load test in JMeter -