jsp - (Spring controller) The requirement sent by the client was syntactically incorrect -
i have following jsp:
<form:form method="post" commandname="fare"> <div><fmt:message key="createfares.name" /></div> <div><form:input path="name" type="text"></form:input> </div> <div><fmt:message key="createfares.amount" /></div> <div><form:input path="amount" type="number" min="0" step="0.01"></form:input></div> <div><fmt:message key="createfares.startdate" /></div> <div><input name="startdate" type="date"/> </div> <div><fmt:message key="createfares.enddate" /></div> <div><input name="enddate" type="date"/> </div> <div><fmt:message key="createfares.description" /></div> <form:textarea path="description" cols="125" /> <div><form:errors path="*"/></div> <fmt:message key="modifyfare.note" /> <div class="submit"><input name="submit" type="submit" value="<fmt:message key="tooltip.modifyfare" />"></div> </form:form>
and have following controllers:
@requestmapping(value="/modify/{idfare}", method=requestmethod.get) public string getmodifyfare(@pathvariable string idfare, modelmap model) @requestmapping(value="/modify/{idfare}", method=requestmethod.post) public string postmodifyfare(@pathvariable string idfare, @modelattribute("fare") @valid fare fare, modelmap model, bindingresult result, final redirectattributes redirectattributes, @requestparam(required = false) string startdate, @requestparam(required = false) string enddate)
the works perfectly, post says "the requirement sent client syntactically incorrect".
anyone know why happening?
in signature of controller's method handle post, have both redirectattributes , modelmap. these 2 types storing variables in model. maybe in conflict. try remove 1 of them.
Comments
Post a Comment