Sorry, I hit send on the last message without seeing the second portion of
your note.
> if you have a look at sevlet API documentation you'll
> see what the parameter of that method means:
>
> public void setContentType(java.lang.String type)
> ...
> type - a String specifying the MIME type of the
> content
>
> The fact that you don't specify charset only means
> that the default, which is ISO-8859-1, will be used.
> I always specify the full MIME type, for example
> response.setContentType("text/html;
> charset=ISO-8859-2") or with any other charset and
> fortunately it works perfectly, that's why I've never
> had problems sending html content in any encoding from
> my servlets.
I understand, and apologize for not specifying the full content-type string
in my example. I agree that if you fully specify this parameter, you will
have
no problem with the display on the browser when you send html content (at
least,
as long as the browser has access to the appropriate font).
What I was trying to point out with my example, however, was that the
contentType parameter of the page directive corresponds to the
response.setContentType method. The purpose of that directive is to
instruct
the browser, as well as to ensure that characters written to the output
stream
are correctly encoded for display at the browser.
Conceivably, the parameter can serve double duty to also inform the JSP
Engine
what encoding is used to actually store the file. However, as I pointed out
earlier,
the hard part is reading in the file in a sensible manner in order to obtain
this
information.
-AMT
===========================================================================
To unsubscribe: mailto [EMAIL PROTECTED] with body: "signoff JSP-INTEREST".
Some relevant FAQs on JSP/Servlets can be found at:
http://java.sun.com/products/jsp/faq.html
http://www.esperanto.org.nz/jsp/jspfaq.html
http://www.jguru.com/jguru/faq/faqpage.jsp?name=JSP
http://www.jguru.com/jguru/faq/faqpage.jsp?name=Servlets