Certo, comunque credo che il tuo problema sia "client-side", se sei infatti riuscito a produrre output di dati pescati da database, qualcosa lo dovrai pur sapere server-side.
Molto semplicemente, facciamo finta che ti trovi in questa situazione:
codice:
<table>
<tr>
<th>Nome</th><th>Cognome</th><th>Numero di telefono</th>
</tr>
<tr>
<td>John</td><td>Doe</td><td>+1 212 555 5555</td>
</tr>
<tr>
<td>John</td><td>Doe</td><td>+1 212 555 5555</td>
</tr>
<tr>
<td>John</td><td>Doe</td><td>+1 212 555 5555</td>
</tr>
</table>
<button onclick="window.open('pagina_inserimento.jsp','popup','width=600,height=600');">Nuovo Contatto</button>
dovrai scrivere pagina_inserimento.jsp che conterrà un form
codice:
<form name="formInserimento" action="pagina_inserimento.jsp" method="post">
Nome: <input type="text" name="nome" />
Cognome: <input type="text" name="congome" />
Telefono: <input type="text" name="telefono" />
<input type="submit" value="Salva Contatto" />
</form>
Piu "su" nella JSP avrai il codice server-side per recuperare i dati, in definitiva
codice:
<%@page contentType="text/html" pageEncoding="UTF-8"%>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
"http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>JSP Page</title>
</head>
<body>
<%
String nome = request.getParameter("nome");
String cognome = request.getParameter("cognome");
if (nome != null && cognome != null) {
out.println("Fatto");
}
else {
%>
<form name="mioForm" action="header.jsp" method="post">
Nome: <input type="text" name="nome" />
Cognome: <input type="text" name="cognome" />
<input type="submit" value="Salva Contatto" />
</form>
<% } %>
</body>
</html>
Al posto di "fatto" farai l'inserimento a database e metterai un link per chiudere la popup e fare il refresh della pagina madre... insomma, era più da javascript che da jsp