Skip to Main Content

Java EE (Java Enterprise Edition) General Discussion

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

getParameter is always null - although the request isn�t empty

843841Jul 21 2004 — edited Jul 5 2006
Hi @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
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Aug 2 2006
Added on Jul 21 2004
30 comments
3,748 views