Re: response.setContentType("text/html; charset=utf-8")

2006-09-21 Thread Al Eridani

On 9/8/06, Raghuveer <[EMAIL PROTECTED]> wrote:


From the source examples
jakarta-struts-1.1-src\jakarta-struts-1.1-src\src\upload\org\apache\struts\w
ebapp\upload

What does the use of
 response.setContentType("text/html; charset=utf-8");


It tells the browser that what the browser is going to receive uses
the UTF-8 character
set, so the browser can display it correctly.

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



response.setContentType("text/html; charset=utf-8")

2006-09-08 Thread Raghuveer

>From the source examples
jakarta-struts-1.1-src\jakarta-struts-1.1-src\src\upload\org\apache\struts\w
ebapp\upload

What does the use of
 response.setContentType("text/html; charset=utf-8");


---
/this line is here for when the input page is upload-utf8.jsp,
//it sets the correct character encoding for the response
String encoding = request.getCharacterEncoding();
if ((encoding != null) && (encoding.equalsIgnoreCase("utf-8")))
{
    response.setContentType("text/html; charset=utf-8");
}


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]