подскажите пожалуйста Как обновить c: forEach с помощью Ajax
мой jsp
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<%@ taglib prefix = "fmt" uri = "http://java.sun.com/jsp/jstl/fmt" %>
<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<html>
<head>
<title>VOLUME</title>
<link rel="stylesheet" href="https://www.w3schools.com/w3css/4/w3.css">
<script src="https://ajax.googleapis.com/ajax/libs/jquery/3.3.1/jquery.min.js"></script>
</head>
<body>
<table class="w3-table-all w3-small w3-centered" >
<tr>
<td><b>Symbol</b></td>
<td><b>1m(net)</b></td>
<td><b>1h(net)</b></td>
<td><b>24h(net)</b></td>
<td><b>1m-24h(net)</b></td>
<td><b>1h-24h(net)</b></td>
<td><b>1W(net)</b></td>
<td><b>1m(tot)</b></td>
<td><b>24h(tot)</b></td>
<td><b>%1m-1h(net)</b></td>
<td><b>%1m-24h(net)</b></td>
<td><b>%1h-24h(net)</b></td>
<td><b>timestamp</b></td>
</tr>
<c:set var="array" value="${lst}" />
<c:forEach items="${list}" var="lst" varStatus="liststatus">
<h2>
<c:set var="array" value="${lst}" />
<tr>
<td>${array.get(0)}</td>
<td><fmt:formatNumber type = "number" maxFractionDigits = "4" groupingUsed = "false" value = "${array.get(1)}" /></td>
<td><fmt:formatNumber type = "number" maxFractionDigits = "4" groupingUsed = "false" value = "${array.get(2)}" /></td>
<td><fmt:formatNumber type = "number" maxFractionDigits = "4" groupingUsed = "false" value = "${array.get(3)}" /></td>
<td><fmt:formatNumber type = "number" maxFractionDigits = "4" groupingUsed = "false" value = "${array.get(4)}" /></td>
<td><fmt:formatNumber type = "number" maxFractionDigits = "4" groupingUsed = "false" value = "${array.get(5)}" /></td>
<td><fmt:formatNumber type = "number" maxFractionDigits = "4" groupingUsed = "false" value = "${array.get(6)}" /></td>
<td><fmt:formatNumber type = "number" maxFractionDigits = "4" groupingUsed = "false" value = "${array.get(7)}" /></td>
<td><fmt:formatNumber type = "number" maxFractionDigits = "4" groupingUsed = "false" value = "${array.get(8)}" /></td>
<td><fmt:formatNumber type = "number" maxFractionDigits = "4" groupingUsed = "false" value = "${array.get(9)}" /></td>
<td><fmt:formatNumber type = "number" maxFractionDigits = "4" groupingUsed = "false" value = "${array.get(10)}" /></td>
<td><fmt:formatNumber type = "number" maxFractionDigits = "4" groupingUsed = "false" value = "${array.get(11)}" /></td>
<td>${array.get(12)}</td>
</tr>
</c:forEach>
</h2>
</table>
<script>
$(document).ready(function ($) {
function test() {
$.ajax({
url: "Page",
type: "POST",
cache: false,
success:function (html) {
$("#content").html(html);
}
})
}
test();
setInterval(test,50*1000);
});
</script>
</body>
</html>
мой servlet
import javax.servlet.ServletException;
import javax.servlet.http.*;
import java.io.IOException;
import java.util.ArrayList;
import VolumeMonitorRead_servlet1.*;
public class Page extends HttpServlet {
ArrayList list = new ReadDB().Read(FinalVariables.DB_Local_Adress, FinalVariables.DB_Local_User, FinalVariables.DB_Local_Password, FinalVariables.DB_Local_PathFile, FinalVariables.DB_Local_PathFileLog);
private static String index = "/WEB-INF/view/index.jsp";
protected void doGet(HttpServletRequest request, HttpServletResponse response)
throws ServletException, IOException {
request.setAttribute("list", list);
request.getRequestDispatcher(index).forward(request, response);
}
public void doPost(HttpServletRequest request, HttpServletResponse response)
throws ServletException, IOException {
ArrayList list1 = new ReadDB().Read(FinalVariables.DB_Local_Adress, FinalVariables.DB_Local_User, FinalVariables.DB_Local_Password, FinalVariables.DB_Local_PathFile, FinalVariables.DB_Local_PathFileLog);
response.setContentType("text/plain");
response.getWriter().write(String.valueOf(list1));
}
}
Виртуальный выделенный сервер (VDS) становится отличным выбором
Как c помощью СSS сделать такие ссылки? Нужно чтобы при наведении курсором они были оранжевыми с белыми символами, а без курсора с серыми с черными...