On Wed, 19 Apr 2000 19:58:41 +0100, Nic Ferrier wrote:
> eg: a container should inspect the header for the character
> encoding before it does any parameter parsing.
> A servlet can then examine the header to see if the servlet
> agrees with what the container suggests.
Yup. It should use the encoding once it's manually set, and extract the one
supplied with Content-Type otherwise.
Something like that (pretty much like it's currently done in Tomcat):
public String getCharacterEncoding()
{
// if the encoding is already set (by the previous call, or the "set"
method)
// then just return it, otherwise extract it from the content type.
return encoding != null ? encoding :
encoding = getCharsetFromContentType( getContentType() );
}
Sincerely,
Dmitry.
___________________________________________________________________________
To unsubscribe, send email to [EMAIL PROTECTED] and include in the body
of the message "signoff SERVLET-INTEREST".
Archives: http://archives.java.sun.com/archives/servlet-interest.html
Resources: http://java.sun.com/products/servlet/external-resources.html
LISTSERV Help: http://www.lsoft.com/manuals/user/user.html