Hi,
I have identified this part of the Turbine code as setting the locale
values:
if ( data.isPageSet() && data.isOutSet() == false )
{
// Modules can override these.
data.getResponse()
.setLocale( data.getLocale() );
data.getResponse()
.setContentType( data.getContentType() );
I have tries to override these settings in the modules, in the
doBuildTemplate() method, data.getResponse().setLocale(new
Locale("ja","JP"));, but unfortunately to no avail.
Either way I am not really interested in setting a different locale.
What I really want to do is avoid any locale being set, and
particularly, avoid the Content-Language header being set. If I set the
locale to null I get an exception:
java.lang.NullPointerException
at org.apache.catalina.util.CharsetMapper.getCharset(CharsetMapper.java:164)
at
org.apache.catalina.connector.ResponseBase.setLocale(ResponseBase.java:826)
at
org.apache.catalina.connector.HttpResponseBase.setLocale(HttpResponseBase.java:800)
at
org.apache.catalina.connector.ResponseFacade.setLocale(ResponseFacade.java:173)
at com.neurogrid.cerego.modules.screens.Test.doBuildTemplate(Test.java:49)
making it seem like there is no way to have Turbine avoid setting a
locale, and thus a Content-Language header. Am I missing anything here?
Thanks in advance.
CHEERS> SAM
Sam Joseph wrote:
>I am trying to work out how to get a response from turbine (or tdk)
>where the Content Language header is *not* set.
>
>My changing the locale settings I find that I can change the Content
>Language header:
>
>locale.default.bundle=MyBundle
>locale.default.language=ja
>locale.default.country=JP
>
>HTTP/1.1 200 OK
>Content-Type: text/html; charset=SJIS
>Date: Tue, 10 Dec 2002 01:54:20 GMT
>Content-Language: ja-JP
>Transfer-Encoding: chunked
>Server: Apache Tomcat/4.0-b6-dev (HTTP/1.1 Connector)
>
>however this has the unfortunate side effect of also adding a
>Content-Type header.
>
>Really what I would like is to be able to ensure that no
>Content-Language or Content-Type headers were set at all.
>
>I am trying to view output from Turbine on a Japanese cell phone and I
>can view responses like this:
>
>HTTP/1.1 200 OK
>Server: Microsoft-IIS/5.0
>Date: Tue, 10 Dec 2002 00:40:45 GMT
>Content-Type: text/html
>Content-Length: 65
>ETag: "65-1038973852966"
>Last-Modified: Wed, 04 Dec 2002 03:50:52 GMT
>
>but when Turbine adds a Content-Language header of any sort
>
>HTTP/1.1 200 OK
>Server: Microsoft-IIS/5.0
>Date: Tue, 10 Dec 2002 00:39:37 GMT
>Connection: close
>Content-Type: text/html
>Content-Language: en-US
>
>or
>
>HTTP/1.1 200 OK
>Content-Type: text/html; charset=SJIS
>Server: Microsoft-IIS/5.0
>Date: Tue, 10 Dec 2002 00:39:37 GMT
>Connection: close
>Content-Type: text/html
>Content-Language: ja-JP
>
>The Japanese characters do not render correctly.
>
>Is there any way to avoid setting a Content-Language header? I find that
>if I remove the locale settings from the Turbine.properties file then
>the system defaults to en-US.
>
>Any help very gratefully received.
>
>CHEERS> SAM
>
>
>
>
>--
>To unsubscribe, e-mail: <mailto:[EMAIL PROTECTED]>
>For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>
>
>
>
>
>
--
To unsubscribe, e-mail: <mailto:[EMAIL PROTECTED]>
For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>