You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tapestry.apache.org by mu...@fantasymail.de on 2007/07/04 12:24:02 UTC
BaseEngine and org.apache.tapestry.request-decoder
How do you inject the Engine into org.apache.tapestry.request-decoder ?
In the workbench example there is:
<extension name="org.apache.tapestry.request-decoder" class="org.apache.tapestry.workbench.RequestDecoder"/>
I am trying to set the locale inside RequestDecoder dependent on the domain name. In order to set the Locale, BaseEngine is necessary....
Thanks!
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
For additional commands, e-mail: users-help@tapestry.apache.org
RE: service method in BaseEngine
Posted by Ma...@bmw.ch.
I wonder, why it even compiles ;). _locale is a private member! Try
using setLocale() instead.
> -----Original Message-----
> From: munich@fantasymail.de [mailto:munich@fantasymail.de]
> Sent: Wednesday, July 04, 2007 1:19 PM
> To: Tapestry users
> Subject: service method in BaseEngine
>
> Has anyone an idea why the following code will not work?
>
> public void service(WebRequest webRequest, WebResponse
> webResponse) throws IOException {
>
>
> if (webRequest.getServerName().startsWith("en.")){
> this._locale=new Locale("en","");
>
> }
> else {
> this._locale=new Locale("de","");
> }
>
> ...
>
>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
> For additional commands, e-mail: users-help@tapestry.apache.org
>
>
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
For additional commands, e-mail: users-help@tapestry.apache.org
service method in BaseEngine
Posted by mu...@fantasymail.de.
Has anyone an idea why the following code will not work?
public void service(WebRequest webRequest, WebResponse webResponse) throws IOException {
if (webRequest.getServerName().startsWith("en.")){
this._locale=new Locale("en","");
}
else {
this._locale=new Locale("de","");
}
...
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
For additional commands, e-mail: users-help@tapestry.apache.org