如何使用@ResponseBody数据填充表格

时间:2016-03-07 14:01:50

标签: java html spring jsp model-view-controller

我在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文件中的表。我该怎么做呢?

0 个答案:

没有答案