Hi,
I am new to java. I want to write a servlet. I have a web page with a numbered list of paragraphs. At the bottom is a form with a textarea field. The viewer can input text, hit "submit" and the data will be posted live on the web page as the next item in the list.
I know I have to getParameter (grab the data)
open the html file
Use FileWriter and PrintWriter to write to the file...
but...how do I tell the servlet to write BEFORE the <body><html> etc.
and how do I refresh the page when it is done so that the viewer sees the post?
please help. thank you.
I am new to java. I want to write a servlet. I have a web page with a numbered list of paragraphs. At the bottom is a form with a textarea field. The viewer can input text, hit "submit" and the data will be posted live on the web page as the next item in the list.
I know I have to getParameter (grab the data)
open the html file
Use FileWriter and PrintWriter to write to the file...
but...how do I tell the servlet to write BEFORE the <body><html> etc.
and how do I refresh the page when it is done so that the viewer sees the post?
please help. thank you.