Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > Java > Struts multipart/form-data textarea character set issue

Reply
Thread Tools

Struts multipart/form-data textarea character set issue

 
 
Marcia
Guest
Posts: n/a
 
      10-20-2005
I have a form I am submitting that allows the user to post a message
and alternately also add a file attachment. The file attachment
portion means that the form has enctype multipart/form-data. So when
the form gets to my server, the other fields in the form are parts to
the form as expected. The form is a jsp page and I am submitting it to
a struts 1.1 application. The code works great on my local PC, but
when the code is deployed to our test server, it is interpreting the
incoming data from the textarea with a different encoding character
set.

I see in RFC 2388 that you are supposed to be able to set a
content-type for text data on a multipart/form-data, and this would
allow a character set for the data in the text field to be specified.
I also see, digging into the struts code, that it appears to look for
this attribute to be set when parsing the multipart/form-data into
request parameters.

However, I can't actually find any documentation, struts, jsp, html, or
otherwise, describing how this content-type property would be *set* for
an element on a multipart/form-data that contains a text field. The
RFC gives an example:

--AaB03x
content-disposition: form-data; name="field1"
content-type: text/plain;charset=windows-1250
content-transfer-encoding: quoted-printable

Joe owes =80100.
--AaB03x

But how do I actually set the content-type (including the charset
attribute) in real life?

 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
set struts.devMode to true in struts.xml does not effect as the docsays? lightning Java 0 07-14-2008 02:57 PM
How to add </textarea> within <textarea> tags? frank.moens@gmail.com Javascript 1 07-04-2007 04:00 PM
Textarea Inside of a textarea wperry1@gmail.com ASP General 6 02-05-2006 08:00 AM
Tomcat 5.028 Struts problem - struts-config.xml does not start with a "/" character Aleksandar Matijaca Java 2 09-19-2004 03:52 PM
Removing carriage returns from <textarea></textarea> input Augustus ASP General 1 09-10-2003 04:55 AM



Advertisments