ti assicuro che i dati vengono trasmessi tutti... puoi fare tu stesso la prova con queste due semplicissime pagine
form.jsp
codice:
<%@page contentType="text/html"%>
<%@page pageEncoding="UTF-8"%>
<%--
The taglib directive below imports the JSTL library. If you uncomment it,
you must also add the JSTL library to the project. The Add Library... action
on Libraries node in Projects view can be used to add the JSTL 1.1 library.
--%>
<%--
<%@taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c"%>
--%>
<!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>Form Demo</title>
</head>
<body>
<h1>Form Demo</h1>
<form name="myform" action="postform.jsp" method="post">
Nome: <input type="text" name="nome" />
Cognome: <input type="text" name="cognome" />
<input type="submit" name="submit" value="Submit" />
</form>
</body>
</html>
e postform.jsp
codice:
<%@page contentType="text/html"%>
<%@page pageEncoding="UTF-8"%>
<%--
The taglib directive below imports the JSTL library. If you uncomment it,
you must also add the JSTL library to the project. The Add Library... action
on Libraries node in Projects view can be used to add the JSTL 1.1 library.
--%>
<%--
<%@taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c"%>
--%>
<!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>Post Form Destination</title>
</head>
<body>
<h1>Retrieving Post Data</h1>
Nome: <% out.println(request.getParameter("nome")); %>
Cognome: <% out.println(request.getParameter("cognome")); %>
Altra prova
</body>
</html>
Per quanto riguarda l'escape dei caratteri "dannossi", chiaramente lo devi fare nella pagina di inserimento nel database (quindi la pagina che elabora i dati in arrivo dal form)... anche perché la pagina che contiene il form (o la pagina target dell'action del form) non sa niente dei dati che stai inserendo nel form stesso fin quando non ne fai il submit....