简体   繁体   English

Spring形式:客户端发送的请求在语法上不正确()

[英]Spring form : The request sent by the client was syntactically incorrect ()

I am getting following error while submitting my spring form 提交春季表格时出现以下错误

The request sent by the client was syntactically incorrect ().

It seems like I am missing some parameters or with incorrect format while submitting the request, but I am not sure about which ones. 似乎在提交请求时缺少某些参数或格式不正确,但是我不确定哪个参数。

My jsp is: 我的jsp是:

 <%@ include file="./inc/header.jsp"%> <!-- form section--> <section class="formSection"> <div class="container"> <h1 class="sectionHeading">Add review</h1> <div class="divider"></div> <div class="postReview"> <form id="msform"> <!-- progressbar --> <ul id="progressbar"> <li class="active">Select categories</li> <li>Select Employees</li> <li>Post a Review</li> </ul> <!-- fieldsets --> <form:form modelAttribute="review" enctype="multipart/form-data" method="post"> <fieldset> <h2 class="fs-title">Select categories</h2> <c:forEach items="${serviceCategoriesList}" var="serviceCategory"> <div class="col-lg-3 col-md-3 col-sm-4 col-xs-6 cateOption"> <div class="cateDisp-icon"> <img src="/getServiceCatImage/${serviceCategory.id}" alt=""> </div> <p>${serviceCategory.serviceCatName}</p> <form:checkbox path="serviceCategories" id="${serviceCategory.id}" value="${serviceCategory.id}" class="chk_service_category" /> <label for="${serviceCategory.id}">&nbsp; </label> <form:errors class="invalid" path="serviceCategories" /> </div> </c:forEach> <div class="clearfix"></div> <input type="button" name="next" class="next action-button" value="Next" onclick="javascript:getCategoryEmployees();" /> </fieldset> <fieldset id="fieldSetEmployees"> <h2 class="fs-title">Select Employees</h2> <div id="empContainer"></div> <div class="clearfix"></div> <input type="button" name="previous" class="previous action-button ceter" value="Previous" /> <input type="button" name="next" class="next action-button center" value="Next" /> </fieldset> <fieldset> <h2 class="fs-title">Post a Review</h2> <div class=""> <div class="form-group col-lg-6 col-md-6 col-sm-12"> <form:label path="customerFirstName">Customer First Name<em class="mandatory">*</em> </form:label> <form:input path="customerFirstName" cssClass="form-control" /> <form:errors class="invalid" path="customerFirstName" /> <div class="clearfix"></div> </div> <div class="form-group col-lg-6 col-md-6 col-sm-12"> <form:label path="customerLastName">Customer Last Name<em class="mandatory">*</em> </form:label> <form:input path="customerLastName" cssClass="form-control" /> <form:errors class="invalid" path="customerLastName" /> <div class="clearfix"></div> </div> </div> <div class=""> <div class="form-group col-lg-6 col-md-6 col-sm-12"> <form:label path="jobID">Job ID<em class="mandatory">*</em> </form:label> <form:input path="jobID" cssClass="form-control" /> <form:errors class="invalid" path="jobID" /> <div class="clearfix"></div> </div> <div class="form-group col-lg-6 col-md-6 col-sm-12"> <form:label path="reviewTitle">Review Title<em class="mandatory">*</em> </form:label> <form:input path="reviewTitle" cssClass="form-control" /> <form:errors class="invalid" path="reviewTitle" /> <div class="clearfix"></div> </div> </div> <div class=""> <div class="form-group col-lg-12 col-md-12 col-sm-12"> <form:label path="review">Review<em class="mandatory">*</em> </form:label> <form:textarea path="review" rows="5" cssClass="form-control" /> <form:errors class="invalid" path="review" /> </div> </div> <div class=""> <div class="form-group col-lg-6 col-md-6 col-sm-12"> <form:label path="starRating" class="left-block">Star Rating<em class="mandatory">*</em> </form:label> <input type="number" name="starRating.id" id="starRatingiD" class="rating" data-clearable="remove" /> <form:errors class="invalid" path="starRating" /> <div class="clearfix"></div> </div> <div class="form-group col-lg-6 col-md-6 col-sm-12"> <form:label path="reviewVideo" class="left-block">Upload Video Review</form:label> <input name="reviewVideo" type="file"> <form:errors class="invalid" path="reviewVideo" /> <div class="clearfix"></div> </div> </div> <div class=""> <div class="form-group col-lg-12 col-md-12 col-sm-12"> <form:label path="apprenticeReview">Apprentice Review<em class="mandatory">*</em> </form:label> <form:textarea path="apprenticeReview" rows="5" cssClass="form-control" /> <form:errors class="invalid" path="apprenticeReview" /> </div> </div> <div class="clearfix"></div> <input type="button" name="previous" class="previous action-button center" value="Previous" /> <form:button type="submit" class="orangebtn btn mtop20">Submit <i class="fa fa-arrow-circle-right left"></i></form:button> </fieldset> </form:form> </form> <div class="clearfix"></div> </div> <div class="clearfix"></div> </div> </section> <script type="text/javascript"> var arrCheckedCategories = ""; function getCheckedCategories() { arrCheckedCategories = $('input:checkbox.chk_service_category').filter( ':checked').map(function() { return this.id; }).get(); console.log(arrCheckedCategories); } function getCategoryEmployees() { getCheckedCategories(); console.log("--" + arrCheckedCategories); console.log("url = " + contextPath + '/review/fetchemp?empType=Employees&catids=' + arrCheckedCategories); $ .ajax({ type : "get", cache : false, url : contextPath + '/review/fetchemp?empType=Employee&catids=' + arrCheckedCategories, success : function(response) { $("#empContainer").html(""); //$('#result').html(data); var genHTML = "";//'<h2 class="fs-title">Select Employees</h2>'; //var response = JSON.parse(response); for (var i = 0; i < response.length; i++) { var obj = response[i]; genHTML = genHTML + '<div class="col-lg-2 col-md-3 col-sm-4 col-xs-6 cateOption">' + '<div class="cateDisp-icon">' + '<img src="/getEmpImage/'+obj['id'] +'" alt="">' + '</div>' + '<p>' + obj['empFirstName'] + ' ' + obj['empLastName'] + '</p>' + '<input type="checkbox" name="employees" id="'+obj['id']+'" /><label for="'+obj['id']+'"/>&nbsp;</label></div>'; } console.log("generated html is: " + genHTML); $("#empContainer").append(genHTML); console.log("url = " + contextPath + '/review/fetchemp?empType=Apprentice&catids=' + arrCheckedCategories); $ .ajax({ type : "get", cache : false, url : contextPath + '/review/fetchemp?empType=Apprentice&catids=' + arrCheckedCategories, success : function(response) { //$('#result').html(data); var genHTML1 = "";//'<h2 class="fs-title">Select Employees</h2>'; //var response = JSON.parse(response); for (var i = 0; i < response.length; i++) { var obj = response[i]; genHTML1 = genHTML1 + '<div class="clearfix"></div><h2 class="fs-title">Select Apprentices</h2><div class="col-lg-2 col-md-3 col-sm-4 col-xs-6 cateOption">' + '<div class="cateDisp-icon">' + '<img src="/getEmpImage/'+obj['id'] +'" alt="">' + '</div>' + '<p>' + obj['empFirstName'] + ' ' + obj['empLastName'] + '</p>' + '<input type="checkbox" name="apprentices" id="'+obj['id']+'" /><label for="'+obj['id']+'"/>&nbsp;</label></div>'; } // genHTML = genHTML + '<div class="clearfix"></div><input type="button" name="previous" class="previous action-button ceter" value="Previous" /> <input type="button" name="next" class="next action-button center" value="Next" />'; console.log("generated html is: " + genHTML1); $("#empContainer").append(genHTML1); }, error : function(e) { alert(e); } }); }, error : function(e) { alert(e); } }); } </script> <!-- top review end --> <%@ include file="./inc/footer.jsp"%> 

My controller is 我的控制器是

/*
 * This method will be called on form submission, handling POST request for
 * saving review in database. It also validates the user input
 */

@RequestMapping(value = { "/add" }, method = RequestMethod.POST)
public String saveReview(@Valid @ModelAttribute("review") Review review,
        BindingResult result, Model model, Map<String, Object> map,
        HttpServletRequest request) {

    boolean isError = false;

    logger.debug("Entered saveReview method");
    logger.debug("review.getCustomerFirstName() : " + review.getCustomerFirstName());
    logger.debug("review.getCustomerLastName() : " + review.getCustomerLastName());
    logger.debug("review.getReview() : "
            + review.getReview());

    logger.debug("review.getReviewTitle() : " + review.getReviewTitle());
    logger.debug("review.getJobID() : " + review.getJobID());
    logger.debug("review.getServiceCategories() : "
            + review.getServiceCategories());
    logger.debug("review.getApprentices() : "
            + review.getApprentices());
    logger.debug("review.getEmployees() : "
            + review.getEmployees());
    logger.debug("review.getReviewVideo() : "
            + review.getReviewVideo());

    logger.debug("review.getStarRating() : "
            + review.getStarRating());
return "redirect:/";

}

While submitting the form from jsp the url which is displaying when the error is generated is: 从jsp提交表单时,生成错误时显示的url为:

http://localhost:8080/abc/review/add?serviceCategories=1&_serviceCategories=on&serviceCategories=2&_serviceCategories=on&_serviceCategories=on&_serviceCategories=on&_serviceCategories=on&_serviceCategories=on&_serviceCategories=on&_serviceCategories=on&_serviceCategories=on&_serviceCategories=on&employees=on&apprentices=on&customerFirstName=Cust1&customerLastName=Last1&jobID=123&reviewTitle=Review+Title1&review=xvxc&starRating.id=2&reviewVideo=Checkout.avi&apprenticeReview=xcvxvcvx&_csrf=47624284-af47-4b37-81ab-fd4216d7c918

Adding logs after enabling debug level for spring and application related logs. 在为Spring和与应用程序相关的日志启用调试级别后添加日志。

DEBUG   2015-08-13 12:15:57,147 [http--127.0.0.1-8080-1] com.abc.dao.helper.ServiceCategoryDAOHelper  - where Clause field.toString(): id
DEBUG   2015-08-13 12:15:57,150 [http--127.0.0.1-8080-1] com.abc.dao.helper.ServiceCategoryDAOHelper  - queryString:  WHERE sc.deleted =  0 AND  sc.id = '18' 
DEBUG   2015-08-13 12:15:57,151 [http--127.0.0.1-8080-2] com.abc.dao.helper.ServiceCategoryDAOHelper  - where Clause field.toString(): id
DEBUG   2015-08-13 12:15:57,154 [http--127.0.0.1-8080-2] com.abc.dao.helper.ServiceCategoryDAOHelper  - queryString:  WHERE sc.deleted =  0 AND  sc.id = '17' 
DEBUG   2015-08-13 12:15:57,151 [http--127.0.0.1-8080-3] com.abc.dao.helper.ServiceCategoryDAOHelper  - where Clause field.toString(): id
DEBUG   2015-08-13 12:15:57,159 [http--127.0.0.1-8080-3] com.abc.dao.helper.ServiceCategoryDAOHelper  - queryString:  WHERE sc.deleted =  0 AND  sc.id = '20' 
DEBUG   2015-08-13 12:15:57,151 [http--127.0.0.1-8080-4] com.abc.dao.helper.ServiceCategoryDAOHelper  - where Clause field.toString(): id
DEBUG   2015-08-13 12:15:57,167 [http--127.0.0.1-8080-4] com.abc.dao.helper.ServiceCategoryDAOHelper  - queryString:  WHERE sc.deleted =  0 AND  sc.id = '19' 
DEBUG   2015-08-13 12:15:57,174 [http--127.0.0.1-8080-1] com.abc.controller.HomeController  - Service Category Found: 1
DEBUG   2015-08-13 12:15:57,177 [http--127.0.0.1-8080-1] com.abc.controller.HomeController  - +++++++++++id: 18
DEBUG   2015-08-13 12:15:57,191 [http--127.0.0.1-8080-4] com.abc.controller.HomeController  - Service Category Found: 1
DEBUG   2015-08-13 12:15:57,216 [http--127.0.0.1-8080-4] com.abc.controller.HomeController  - +++++++++++id: 19
DEBUG   2015-08-13 12:15:57,217 [http--127.0.0.1-8080-4] com.abc.controller.HomeController  - +++++++++++rpath: G:/abc/Code/StorageSpace/1438565998421_4-gas-ducted-heating.jpg
DEBUG   2015-08-13 12:15:57,188 [http--127.0.0.1-8080-3] com.abc.controller.HomeController  - Service Category Found: 1
DEBUG   2015-08-13 12:15:57,219 [http--127.0.0.1-8080-3] com.abc.controller.HomeController  - +++++++++++id: 20
DEBUG   2015-08-13 12:15:57,221 [http--127.0.0.1-8080-3] com.abc.controller.HomeController  - +++++++++++rpath: G:/abc/Code/StorageSpace/1438730168480_4-gas-ducted-heating.jpg
DEBUG   2015-08-13 12:15:57,185 [http--127.0.0.1-8080-2] com.abc.controller.HomeController  - Service Category Found: 1
DEBUG   2015-08-13 12:15:57,215 [http--127.0.0.1-8080-1] com.abc.controller.HomeController  - +++++++++++rpath: G:/abc/Code/StorageSpace/1438565590343_4-gas-ducted-heating.jpg
DEBUG   2015-08-13 12:15:57,224 [http--127.0.0.1-8080-2] com.abc.controller.HomeController  - +++++++++++id: 17
DEBUG   2015-08-13 12:15:57,226 [http--127.0.0.1-8080-2] com.abc.controller.HomeController  - +++++++++++rpath: G:/abc/Code/StorageSpace/1438563646726_4-gas-ducted-heating.jpg
DEBUG   2015-08-13 12:16:18,673 [http--127.0.0.1-8080-5] com.abc.dao.helper.ServiceCategoryDAOHelper  - queryString:  WHERE sc.deleted =  0
DEBUG   2015-08-13 12:16:18,954 [http--127.0.0.1-8080-4] com.abc.dao.helper.ServiceCategoryDAOHelper  - where Clause field.toString(): id
DEBUG   2015-08-13 12:16:18,955 [http--127.0.0.1-8080-6] com.abc.dao.helper.ServiceCategoryDAOHelper  - where Clause field.toString(): id
DEBUG   2015-08-13 12:16:18,955 [http--127.0.0.1-8080-3] com.abc.dao.helper.ServiceCategoryDAOHelper  - where Clause field.toString(): id
DEBUG   2015-08-13 12:16:18,954 [http--127.0.0.1-8080-5] com.abc.dao.helper.ServiceCategoryDAOHelper  - where Clause field.toString(): id
DEBUG   2015-08-13 12:16:18,954 [http--127.0.0.1-8080-1] com.abc.dao.helper.ServiceCategoryDAOHelper  - where Clause field.toString(): id
DEBUG   2015-08-13 12:16:18,960 [http--127.0.0.1-8080-1] com.abc.dao.helper.ServiceCategoryDAOHelper  - queryString:  WHERE sc.deleted =  0 AND  sc.id = '15' 
DEBUG   2015-08-13 12:16:18,959 [http--127.0.0.1-8080-5] com.abc.dao.helper.ServiceCategoryDAOHelper  - queryString:  WHERE sc.deleted =  0 AND  sc.id = '1' 
DEBUG   2015-08-13 12:16:18,958 [http--127.0.0.1-8080-3] com.abc.dao.helper.ServiceCategoryDAOHelper  - queryString:  WHERE sc.deleted =  0 AND  sc.id = '4' 
DEBUG   2015-08-13 12:16:18,957 [http--127.0.0.1-8080-6] com.abc.dao.helper.ServiceCategoryDAOHelper  - queryString:  WHERE sc.deleted =  0 AND  sc.id = '2' 
DEBUG   2015-08-13 12:16:18,956 [http--127.0.0.1-8080-2] com.abc.dao.helper.ServiceCategoryDAOHelper  - where Clause field.toString(): id
DEBUG   2015-08-13 12:16:18,975 [http--127.0.0.1-8080-2] com.abc.dao.helper.ServiceCategoryDAOHelper  - queryString:  WHERE sc.deleted =  0 AND  sc.id = '16' 
DEBUG   2015-08-13 12:16:18,956 [http--127.0.0.1-8080-4] com.abc.dao.helper.ServiceCategoryDAOHelper  - queryString:  WHERE sc.deleted =  0 AND  sc.id = '3' 
DEBUG   2015-08-13 12:16:18,976 [http--127.0.0.1-8080-6] com.abc.controller.HomeController  - Service Category Found: 1
DEBUG   2015-08-13 12:16:18,973 [http--127.0.0.1-8080-3] com.abc.controller.HomeController  - Service Category Found: 1
DEBUG   2015-08-13 12:16:18,968 [http--127.0.0.1-8080-5] com.abc.controller.HomeController  - Service Category Found: 1
DEBUG   2015-08-13 12:16:18,966 [http--127.0.0.1-8080-1] com.abc.controller.HomeController  - Service Category Found: 1
DEBUG   2015-08-13 12:16:18,986 [http--127.0.0.1-8080-5] com.abc.controller.HomeController  - +++++++++++id: 1
DEBUG   2015-08-13 12:16:18,985 [http--127.0.0.1-8080-4] com.abc.controller.HomeController  - Service Category Found: 1
DEBUG   2015-08-13 12:16:18,985 [http--127.0.0.1-8080-3] com.abc.controller.HomeController  - +++++++++++id: 4
DEBUG   2015-08-13 12:16:18,985 [http--127.0.0.1-8080-6] com.abc.controller.HomeController  - +++++++++++id: 2
DEBUG   2015-08-13 12:16:18,983 [http--127.0.0.1-8080-2] com.abc.controller.HomeController  - Service Category Found: 1
DEBUG   2015-08-13 12:16:18,989 [http--127.0.0.1-8080-6] com.abc.controller.HomeController  - +++++++++++rpath: G:/abc/Code/StorageSpace/icon-ref.png
DEBUG   2015-08-13 12:16:18,989 [http--127.0.0.1-8080-3] com.abc.controller.HomeController  - +++++++++++rpath: G:/abc/Code/StorageSpace/icon-electrical.png
DEBUG   2015-08-13 12:16:18,988 [http--127.0.0.1-8080-4] com.abc.controller.HomeController  - +++++++++++id: 3
DEBUG   2015-08-13 12:16:19,000 [http--127.0.0.1-8080-4] com.abc.controller.HomeController  - +++++++++++rpath: G:/abc/Code/StorageSpace/icon-plumbing.png
DEBUG   2015-08-13 12:16:18,987 [http--127.0.0.1-8080-5] com.abc.controller.HomeController  - +++++++++++rpath: G:/abc/Code/StorageSpace/icon-heat.png
DEBUG   2015-08-13 12:16:18,987 [http--127.0.0.1-8080-1] com.abc.controller.HomeController  - +++++++++++id: 15
DEBUG   2015-08-13 12:16:19,013 [http--127.0.0.1-8080-3] com.abc.dao.helper.ServiceCategoryDAOHelper  - where Clause field.toString(): id
DEBUG   2015-08-13 12:16:19,015 [http--127.0.0.1-8080-3] com.abc.dao.helper.ServiceCategoryDAOHelper  - queryString:  WHERE sc.deleted =  0 AND  sc.id = '19' 
DEBUG   2015-08-13 12:16:19,012 [http--127.0.0.1-8080-4] com.abc.dao.helper.ServiceCategoryDAOHelper  - where Clause field.toString(): id
DEBUG   2015-08-13 12:16:19,010 [http--127.0.0.1-8080-6] com.abc.dao.helper.ServiceCategoryDAOHelper  - where Clause field.toString(): id
DEBUG   2015-08-13 12:16:19,023 [http--127.0.0.1-8080-6] com.abc.dao.helper.ServiceCategoryDAOHelper  - queryString:  WHERE sc.deleted =  0 AND  sc.id = '18' 
DEBUG   2015-08-13 12:16:18,990 [http--127.0.0.1-8080-2] com.abc.controller.HomeController  - +++++++++++id: 16
DEBUG   2015-08-13 12:16:19,025 [http--127.0.0.1-8080-2] com.abc.controller.HomeController  - +++++++++++rpath: G:/abc/Code/StorageSpace/1438324717080_4-gas-ducted-heating.jpg
DEBUG   2015-08-13 12:16:19,024 [http--127.0.0.1-8080-3] com.abc.controller.HomeController  - Service Category Found: 1
DEBUG   2015-08-13 12:16:19,034 [http--127.0.0.1-8080-3] com.abc.controller.HomeController  - +++++++++++id: 19
DEBUG   2015-08-13 12:16:19,019 [http--127.0.0.1-8080-5] com.abc.dao.helper.ServiceCategoryDAOHelper  - where Clause field.toString(): id
DEBUG   2015-08-13 12:16:19,017 [http--127.0.0.1-8080-4] com.abc.dao.helper.ServiceCategoryDAOHelper  - queryString:  WHERE sc.deleted =  0 AND  sc.id = '17' 
DEBUG   2015-08-13 12:16:19,013 [http--127.0.0.1-8080-1] com.abc.controller.HomeController  - +++++++++++rpath: G:/abc/Code/StorageSpace/1438320334003_Untitled.png
DEBUG   2015-08-13 12:16:19,036 [http--127.0.0.1-8080-5] com.abc.dao.helper.ServiceCategoryDAOHelper  - queryString:  WHERE sc.deleted =  0 AND  sc.id = '20' 
DEBUG   2015-08-13 12:16:19,035 [http--127.0.0.1-8080-3] com.abc.controller.HomeController  - +++++++++++rpath: G:/abc/Code/StorageSpace/1438565998421_4-gas-ducted-heating.jpg
DEBUG   2015-08-13 12:16:19,032 [http--127.0.0.1-8080-6] com.abc.controller.HomeController  - Service Category Found: 1
DEBUG   2015-08-13 12:16:19,047 [http--127.0.0.1-8080-6] com.abc.controller.HomeController  - +++++++++++id: 18
DEBUG   2015-08-13 12:16:19,048 [http--127.0.0.1-8080-6] com.abc.controller.HomeController  - +++++++++++rpath: G:/abc/Code/StorageSpace/1438565590343_4-gas-ducted-heating.jpg
DEBUG   2015-08-13 12:16:19,056 [http--127.0.0.1-8080-4] com.abc.controller.HomeController  - Service Category Found: 1
DEBUG   2015-08-13 12:16:19,067 [http--127.0.0.1-8080-4] com.abc.controller.HomeController  - +++++++++++id: 17
DEBUG   2015-08-13 12:16:19,068 [http--127.0.0.1-8080-4] com.abc.controller.HomeController  - +++++++++++rpath: G:/abc/Code/StorageSpace/1438563646726_4-gas-ducted-heating.jpg
DEBUG   2015-08-13 12:16:19,068 [http--127.0.0.1-8080-5] com.abc.controller.HomeController  - Service Category Found: 1
DEBUG   2015-08-13 12:16:19,071 [http--127.0.0.1-8080-5] com.abc.controller.HomeController  - +++++++++++id: 20
DEBUG   2015-08-13 12:16:19,072 [http--127.0.0.1-8080-5] com.abc.controller.HomeController  - +++++++++++rpath: G:/abc/Code/StorageSpace/1438730168480_4-gas-ducted-heating.jpg
DEBUG   2015-08-13 12:16:23,396 [http--127.0.0.1-8080-2] com.abc.controller.ReviewController  - selected employe type :Employee
DEBUG   2015-08-13 12:16:23,397 [http--127.0.0.1-8080-2] com.abc.controller.ReviewController  - selected categories are :1,2
DEBUG   2015-08-13 12:16:23,399 [http--127.0.0.1-8080-2] com.abc.controller.ReviewController  - selected categories id :1
DEBUG   2015-08-13 12:16:23,400 [http--127.0.0.1-8080-2] com.abc.controller.ReviewController  - selected categories id :2
DEBUG   2015-08-13 12:16:23,403 [http--127.0.0.1-8080-2] com.abc.dao.helper.EmployeeDAOHelper  - where Clause field.toString(): Employee Type
DEBUG   2015-08-13 12:16:23,404 [http--127.0.0.1-8080-2] com.abc.dao.helper.EmployeeDAOHelper  - where Clause field.toString(): serviceCatIdList
DEBUG   2015-08-13 12:16:23,405 [http--127.0.0.1-8080-2] com.abc.dao.helper.EmployeeDAOHelper  - queryString:  WHERE e.deleted = 0 AND  e.employeeType.id = '1'  AND ( serviceCategories.id = '1'  OR  serviceCategories.id = '2'  )
DEBUG   2015-08-13 12:16:23,424 [http--127.0.0.1-8080-2] com.abc.controller.ReviewController  - employeeList.size() : 1
DEBUG   2015-08-13 12:16:23,424 [http--127.0.0.1-8080-2] com.abc.controller.ReviewController  - employee.getId() : 11
DEBUG   2015-08-13 12:16:23,457 [http--127.0.0.1-8080-2] com.abc.controller.ReviewController  - selected employe type :Apprentice
DEBUG   2015-08-13 12:16:23,457 [http--127.0.0.1-8080-2] com.abc.controller.ReviewController  - selected categories are :1,2
DEBUG   2015-08-13 12:16:23,458 [http--127.0.0.1-8080-5] com.abc.dao.helper.EmployeeDAOHelper  - where Clause field.toString(): id
DEBUG   2015-08-13 12:16:23,459 [http--127.0.0.1-8080-2] com.abc.controller.ReviewController  - selected categories id :1
DEBUG   2015-08-13 12:16:23,459 [http--127.0.0.1-8080-5] com.abc.dao.helper.EmployeeDAOHelper  - queryString:  WHERE (e.deleted = 0 OR e.deleted =  1) AND  e.id = '11' 
DEBUG   2015-08-13 12:16:23,460 [http--127.0.0.1-8080-2] com.abc.controller.ReviewController  - selected categories id :2
DEBUG   2015-08-13 12:16:23,464 [http--127.0.0.1-8080-2] com.abc.dao.helper.EmployeeDAOHelper  - where Clause field.toString(): Employee Type
DEBUG   2015-08-13 12:16:23,464 [http--127.0.0.1-8080-2] com.abc.dao.helper.EmployeeDAOHelper  - where Clause field.toString(): serviceCatIdList
DEBUG   2015-08-13 12:16:23,465 [http--127.0.0.1-8080-2] com.abc.dao.helper.EmployeeDAOHelper  - queryString:  WHERE e.deleted = 0 AND  e.employeeType.id = '2'  AND ( serviceCategories.id = '1'  OR  serviceCategories.id = '2'  )
DEBUG   2015-08-13 12:16:23,478 [http--127.0.0.1-8080-5] com.abc.controller.HomeController  - Employee List Found: 1
DEBUG   2015-08-13 12:16:23,478 [http--127.0.0.1-8080-2] com.abc.controller.ReviewController  - employeeList.size() : 1
DEBUG   2015-08-13 12:16:23,480 [http--127.0.0.1-8080-2] com.abc.controller.ReviewController  - employee.getId() : 10
DEBUG   2015-08-13 12:16:23,479 [http--127.0.0.1-8080-5] com.abc.controller.HomeController  - +++++++++++id: 11
DEBUG   2015-08-13 12:16:23,482 [http--127.0.0.1-8080-5] com.abc.controller.HomeController  - +++++++++++rpath: G:/abc/Code/StorageSpace/1439340240683_4-gas-ducted-heating.jpg
DEBUG   2015-08-13 12:16:23,495 [http--127.0.0.1-8080-2] com.abc.dao.helper.EmployeeDAOHelper  - where Clause field.toString(): id
DEBUG   2015-08-13 12:16:23,497 [http--127.0.0.1-8080-2] com.abc.dao.helper.EmployeeDAOHelper  - queryString:  WHERE (e.deleted = 0 OR e.deleted =  1) AND  e.id = '10' 
DEBUG   2015-08-13 12:16:23,511 [http--127.0.0.1-8080-2] com.abc.controller.HomeController  - Employee List Found: 1
DEBUG   2015-08-13 12:16:23,512 [http--127.0.0.1-8080-2] com.abc.controller.HomeController  - +++++++++++id: 10
DEBUG   2015-08-13 12:16:23,513 [http--127.0.0.1-8080-2] com.abc.controller.HomeController  - +++++++++++rpath: G:/abc/Code/StorageSpace/1438927461554_4-gas-ducted-heating.jpg

Found the issue. 找到了问题。

In my jsp, I mistakenly had two forms (one under the other) 在我的jsp中,我错误地使用了两种形式(一种在另一种形式下)

<form id="msform">
            <!-- progressbar -->
            <ul id="progressbar">
                <li class="active">Select categories</li>
                <li>Select Employees</li>
                <li>Post a Review</li>
            </ul>
            <!-- fieldsets -->
            <form:form modelAttribute="review" enctype="multipart/form-data"
                method="post">

I updated the code to following and now I am not getting this error 我将代码更新为以下代码,但现在没有收到此错误

<form:form modelAttribute="review" enctype="multipart/form-data"
                    method="post" id="msform"> 
                <!-- progressbar -->
                <ul id="progressbar">
                    <li class="active">Select categories</li>
                    <li>Select Employees</li>
                    <li>Post a Review</li>
                </ul>

暂无
暂无

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 JSON:客户端发送的请求在语法上不正确 - JSON : The request sent by the client was syntactically incorrect Ajax-Spring发送javascript对象并接受作为自定义对象。客户端发送的请求在语法上不正确 - Ajax - Spring send javascript object and accept as custom object.The request sent by the client was syntactically incorrect 状态400客户端发送的请求在语法上不正确。 AngularJS http - Status 400 The request sent by the client was syntactically incorrect. Angularjs http 在对Jira进行REST调用时,“客户端发送的请求在语法上不正确” - “request sent by the client was syntactically incorrect” when making REST call to Jira DHTMLX dhtmlxForm.send()抛出HTTP状态400-“客户端发送的请求在语法上不正确。” - DHTMLX dhtmlxForm.send() Throws HTTP Status 400 - “The request sent by the client was syntactically incorrect.” Spring:从客户端发送请求正文时出错,但与邮递员一起工作吗? - Spring: request body missing error when sent from client but works with postman? 为什么此JavaScript if语句/ for循环在语法上不正确? - Why is this javascript if statement/for-loop syntactically incorrect? 使用 fetch() 发送带有正文表单数据的 Post 请求 - Sent Post Request with Body Form Data with fetch() Post Request express:发送到客户端后无法设置标头 - Post Request express: Cannot set headers after they are sent to the client 如何在 node.js 中将请求结果发送到客户端浏览器 - How to sent results of request to client browser in node.js
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM