-
1. Re: How do you set the transfer-encoding
maeste Sep 14, 2006 12:31 PM (in response to alanjonesbath)Tomcat in last versions use http-1.1 chunked encoding.
As far as I know you can downgrade to http 1.0 in the client connection or better using 1.1 setting in the HTTP HEADER Connection=close.
In java:HttpURLConnection conn = (HttpURLConnection) conn.openConnection(); conn.setRequestProperty("Connection","close");
-
2. Re: How do you set the transfer-encoding
bf109e Sep 19, 2006 3:45 AM (in response to alanjonesbath)Hi,
I think I have a similar problem.
I'm just starting to learn JBoss and J2EE.
I just inherited a huge Web project running on JBoss. Part of this inheritance is the truckload of bugs, of course.
My problem is:
The server always serves up pages with the charset set to "Shift_JIS", even if the JSP pages explicitly states that the pages should have UTF-8 charset and encoding.
Hence, once the pages are served, if you do a view-source, you'll see all the JSP code stating UTF-8 as the charset+encoding.
However, if you submit a form, the parameters in the URI are all encoded in SJIS, thereby causing never-ending probelms on the server side.
What do I need to do to make the pages served as UTF-8? Are there any configuration settings I need to override? -
3. Re: How do you set the transfer-encoding
alanjonesbath Sep 19, 2006 4:05 AM (in response to alanjonesbath)OK, I found the solution (and cause) of the problem. Apparently .NET doesn't implement HTTP/1.1 correctly, so needs the following line adding to the connector element of the Tomcat server.xml file:
restrictedUserAgents="^.*MS Web Services Client Protocol.*$"
As with everything, once you know what to look for, you find it! There is an entry in the Wiki about it ;-)