Estou com um problema no seguinte código tenho uma JSP que fica aguardando um arquivo so que enquanto aguarda preciso mostrar uma imagem no html
mas ta entrando no while e não exibe o HTML o que faço para resolver isto?
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
<title>Problema</title>
</head>
<body>
<img src="loading.gif">
<%
BufferedReader buf = null;
String link = "";
File f = new File(getServletContext().getRealPath("/html.txt"));
while(link.isEmpty())
{
if (f.exists() && f.canRead() && f.isFile())
{
buf = new BufferedReader(new FileReader(getServletContext().getRealPath("/html.txt")));
link = buf.readLine();
buf.close();
f.delete();
response.sendRedirect(link);
}
}
%>
</body>
</html>