Hi,
I am having trouble here, the req.getparameter is returning null. (as tested by system.out.println)
I guess it is something simple i just don't understand.
[ I have put text in the textarea and have tried a variety of tests to prove that my problem line seems to be
InputFile = rq.getParameter("file"); returns null.
It actually errors and prints stack trace by
StringReader isr = new StringReader(InputFile); ]
the Html Page ----------------------------
<FORM ENCTYPE="multipart/form-data"
method="POST" ACTION="/servlet/StringConversion">
<Textarea rows=10 cols=40 name="file"></textarea>
<BR>
<INPUT TYPE="submit" VALUE="Translate File">
</FORM>
the servlet---------------------------------
String InputFile = new String();
InputFile = rq.getParameter("file");
System.out.println(InputFile);
try{
StringReader isr = new StringReader(InputFile); //this is
// of course where it errors out as the string=null.
BufferedReader in = new BufferedReader(isr);
-----------------------------------------
Thanks a load!!
I am having trouble here, the req.getparameter is returning null. (as tested by system.out.println)
I guess it is something simple i just don't understand.
[ I have put text in the textarea and have tried a variety of tests to prove that my problem line seems to be
InputFile = rq.getParameter("file"); returns null.
It actually errors and prints stack trace by
StringReader isr = new StringReader(InputFile); ]
the Html Page ----------------------------
<FORM ENCTYPE="multipart/form-data"
method="POST" ACTION="/servlet/StringConversion">
<Textarea rows=10 cols=40 name="file"></textarea>
<BR>
<INPUT TYPE="submit" VALUE="Translate File">
</FORM>
the servlet---------------------------------
String InputFile = new String();
InputFile = rq.getParameter("file");
System.out.println(InputFile);
try{
StringReader isr = new StringReader(InputFile); //this is
// of course where it errors out as the string=null.
BufferedReader in = new BufferedReader(isr);
-----------------------------------------
Thanks a load!!