getParameter is always null - although the request isn�t empty
843841Jul 21 2004 — edited Jul 5 2006Hi @all,
I have the problem that all my parameters seem to be null when I use
String abstract1 = request.getParameter("abstract");
[snip]
clientout.println("abstract = " +abstract1);
abstract1 is null.
I use HTTP-Post in an HTML-Form. Here is the HTML-code:
<form name="form" enctype="multipart/form-data" method="post" action="http://host:8080/servlet/servlet?">
...
here are some textareas ans selecions with different names and values.
<INPUT TYPE="submit" name="submit" VALUE="OK"/>
...
</form>
Does anyone know the problem and a solution? I can�t find the error.
doPost(HttpServletRequest request, HttpServletResponse response)
the request isn�t null. I�ve tested it by the following:
BufferedReader br = req.getReader();
StringBuffer sb = new StringBuffer( 2000 );
String line = null;
while ( ( line = br.readLine() ) != null ) {
sb.append( line + "\n" );
}
br.close();
String s = sb.toString();
s = s.substring(k,d+1);
System.out.println(s);
every parameter and its value are in the request!
Any ideas?
Regards Tina