我在MVC项目的控制器中有这样的功能
@RequestMapping(value = "", method = RequestMethod.POST)
@ResponseBody
public GetOrdersByEmailRequest createRequest(@RequestParam String email1) {
GetOrdersByEmailRequest getOrdersByEmailRequest = null;
try {
// LOG.info("Preparing Request for lookup Email :" + lookoupEmail);
getOrdersByEmailRequest = new GetOrdersByEmailRequest();
getOrdersByEmailRequest.setEmail(email1);
getOrdersByEmailRequest.setFetchType(OrderDetailsFetchType.FETCH_WITH_SUBORDER_DETAILS);
// getOrdersByEmailRequest.setPageSize(GETORDERSBYEMAIL_PAGESIZE);
// getOrdersByEmailRequest.setRequestProtocol(Protocol.PROTOCOL_JSON);
// getOrdersByEmailRequest.setResponseProtocol(Protocol.PROTOCOL_JSON);
// getOrdersByEmailRequest.setStart(PAGESIZE_OFFSET);
getOrdersByEmailRequest.setUserTrackingId(null);
getOrdersByEmailRequest.setContextSRO(null);
} catch (Exception e) {
// TODO Auto-generated catch block
// LOG.error("Error in preparing OMS Request",e);
}
return getOrdersByEmailRequest;
}
所以现在当我使用网页上的提交按钮时,浏览器会显示jSON对象。现在,而不是显示我想要使用它的对象,并填充JSP文件中的表。我该怎么做呢?