1

我正在使用弹簧 MVC。

我的控制器是:

@RequestMapping(value = "/approval/pendingescort", method = RequestMethod.GET)
public String getPendingEscort(Model model) {

    log.debug("Received request to show Pending Escorts");

// Retrieve all pending escort details by delegating the call to Servicelayer
    List<EscortRegistration> pendingEscortdetails = approvalService.getAllPendingEscort();

// Attach zones to the Model
     model.addAttribute("pendingEscortdetails", pendingEscortdetails);

// This will resolve to /WEB-INF/jsp/pendingescort.jsp
    return "pendingescort";
}

@RequestMapping(value = "/approval/pendingescort/success", method = RequestMethod.GET)
public String addEscort(@RequestParam(value="mobileno", required=true) String mobileno,Model model) {

    log.debug("Received request to Accept Escort Request");

        // Call ZonedetailsService to do the actual Updating
        approvalService.approveEscortRequest(mobileno);

        // Add mobile reference to Model
        model.addAttribute("mobileno", mobileno);

        // This will resolve to /WEB-INF/jsp/addedescortpage.jsp
        return "pendingescort";
}

我的 JSP 是:

<tbody>
                    <c:forEach items="${pendingEscortdetails}" var="escort">
                    <c:url var="editUrl" value="/efmfm/main/approval/pendingescort/success?mobileno=${escort.mobilenumber}" />
                    <c:url var="deleteUrl" value="/efmfm/main/approval/pendingescort/delete?mobileno=${escort.mobilenumber}" />
                    <tr>
                    <td><c:out value="${escort.mobilenumber}" /></td>
                    <td><c:out value="${escort.imei}" /></td>
                <td>    <a href="${editUrl}" class="approv">Approve</a> 

                    <!--  <td>Approve</td> -->
                    <a href="${deleteUrl}" class="approv">Reject</a>
                    </td>
                    </tr>
                    </c:forEach>
                </tbody

当我单击以批准其发送到成功页面时。我想通过刷新将其带到上一页。任何人都可以解决我的问题。

4

2 回答 2

0

采用

return "redirect:../../../approval/pendingescort";

代替

return "pendingescort";
于 2013-03-05T07:30:32.927 回答
0

第一:我猜你需要使用"../.."

return "redirect:../../../approval/pendingescort";


还有一个疑问。你用瓷砖吗??

于 2013-03-05T08:35:41.240 回答