wood burning stoves 2.0*
The moose likes Servlets and the fly likes read contents of a textarea and an uploaded file simultaneously Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Murach's Java Servlets and JSP this week in the Servlets forum!
JavaRanch » Java Forums » Java » Servlets
Bookmark "read contents of a textarea and an uploaded file simultaneously" Watch "read contents of a textarea and an uploaded file simultaneously" New topic
Author

read contents of a textarea and an uploaded file simultaneously

Sunetra Sen
Ranch Hand

Joined: Feb 17, 2005
Posts: 43
Hi,
I have a UI in which I have a input type=file to upload a file containing some words.I also have a text area in the same UI where the user can enter certain words.
Now in the servlet to which the request from this UI submits to, I want both the file contents and the text entered by the user in the text area.
I have defined my form as:
<FORM NAME="myForm" ENCTYPE="multipart/form-data" METHOD='POST'/>

But in the servlet the contents of the textarea comes as null.As My UI is rendered by using XSLT I cannot set the text entered by the user in session.

Please let me know how I can access the textarea contents?
I am using jakarta's file upload utility for uploading the files.

Thanks,
Sunetra.
Adeel Ansari
Ranch Hand

Joined: Aug 15, 2004
Posts: 2874
commons fileupload user guide.
Sunetra Sen
Ranch Hand

Joined: Feb 17, 2005
Posts: 43
Got it!
Should have seen the tutorial first

Thanks a lot!!
 
wood burning stoves
 
subject: read contents of a textarea and an uploaded file simultaneously
 
Similar Threads
problem enctype and charset
TextArea focus
send xml from jsp and read it in a servlet
Control M characters from textarea data
acessing data of the textarea within the form of multipart type