简体   繁体   English

从html表行调用servlet并在该行中获取响应

[英]calling a servlet from html table row and get response in that row

我的项目体系结构中有一个要求,我必须从html表行调用servlet,并且当servlet发送响应时,响应应显示在该html行中。

You can use jsp:include in your table. 您可以在表中使用jsp:include

<jsp:include page="/HandlerServlet" flush="true">  

But it doesn't lead to good design. 但这并不能带来良好的设计。

This can be done with Ajax. 可以使用Ajax完成。 Have a look at jQuery library that makes it easy. 看一下简化它的jQuery库。

Or you can use a library like Ext-JS that would give you a grid (table) that fetches data from servlet. 或者,您可以使用Ext-JS之类的库,该库将为您提供一个从Servlet提取数据的表格(表)。

You can use DWR . 您可以使用DWR It's simple to use. 使用简单。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM