weixin_33736832 2015-09-19 09:20 采纳率: 0%
浏览 281

从servlet重新加载jsp页面

I have a jsp page with a table. Every row of the table call a servlet that delete value from that row. Now I have to recall from servlet the same jsp page but I have to reload that for show the update. How can I do that??

this is the jsp calling servlet code

<tr class="row" data-href="${pageContext.request.contextPath}/adminServlet>
        <td><c:out value="${product.id}" /></td>
        <td><c:out value="${product.name}" /></td>
        <td><c:out value="${product.cost}" /></td> 
</tr>

and this is how I recall jsp page from servlet

RequestDispatcher rd=request.getRequestDispatcher("admin.jsp");    
rd.include(request,response); 
  • 写回答

1条回答 默认 最新

  • weixin_33694620 2015-09-19 09:37
    关注

    You can use ajax for this problem. Load table data in a jsp as a response from the servlet.

    评论

报告相同问题?