I'm doing a chat exercise to test the application.set or get and leave the users and what they write and everything is fine, but I have to make a button to reload the page and I'm not able ...
<form action="verchat.jsp" name="fomchat" method="POST">
<input type="text" name="texto" placeholder="escribe aquí" value="">
<input type="submit" name="btnchat" value="Enviar">
</form>
<textarea cols=66 rows=12 name="Texto" placeholder="chat" value=""><%=frase%></textarea><br/>
<input type="button" name="btnrecarga" value="Recargar">
I've also tried with
if(request.getParameter("btnrecarga") != null){
response.sendRedirect("http://localhost:8080/ChatWeb/verchat.jsp");
}
and
if(request.getParameter("btnrecarga") != null){
response.sendRedirect("localhost:8080/ChatWeb/verchat.jsp");
}
and
if(request.getParameter("btnrecarga") != null){
response.sendRedirect("verchat.jsp");
return;
}
Thank you very much!