Wrong charset in strange conditions

2006-09-25 Thread Jean-Eric Cuendet (RPT)

Hi,
I have a Tapestry 4.0.2 website which works fine since months. Today I 
realized that the charset of the site was not consistent: the webserver 
returned charset=UTF-8 while the html code was charset=ISO-8859-1

The pages themselves are in UTF-8 and were displayed correctly.

So I changed the BorderComponent (which is put around each page at 
renderinig time) to return charset=UTF-8

It works OK for all pages except in *one* situation.
If I get a given page directly with a URL like 
my.site.com/servlet/MyPage.html (whch get page MyPage.page/html) the 
charset is UTF-8 and OK.
But if I get the page through a PageRedirectException(MyPage) then the 
charset is wrong. The code in html say charset=UTF-8, the web server 
also, but the page itself seems to have been converted to 8859-1 and so 
the browser displays it badly...


Any idea what happens?
Thanks
-jec

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



Re: Wrong charset in strange conditions

2006-09-25 Thread Jean-Eric Cuendet (RPT)

I would add that it appears if I use:
MyPage myPage = ...
throw new PageRedirectException(myPage);
and:
throw new PageRedirectException(MyPage);

Also, after the RedirectException, the URL is not .../MyPage.html but 
.../OtherPage.html where OtherPage is where the Redirect occurs. Is that 
normal?


Thanks a lot
-jec

Jean-Eric Cuendet (RPT) wrote:

Hi,
I have a Tapestry 4.0.2 website which works fine since months. Today I 
realized that the charset of the site was not consistent: the webserver 
returned charset=UTF-8 while the html code was charset=ISO-8859-1

The pages themselves are in UTF-8 and were displayed correctly.

So I changed the BorderComponent (which is put around each page at 
renderinig time) to return charset=UTF-8

It works OK for all pages except in *one* situation.
If I get a given page directly with a URL like 
my.site.com/servlet/MyPage.html (whch get page MyPage.page/html) the 
charset is UTF-8 and OK.
But if I get the page through a PageRedirectException(MyPage) then the 
charset is wrong. The code in html say charset=UTF-8, the web server 
also, but the page itself seems to have been converted to 8859-1 and so 
the browser displays it badly...


Any idea what happens?
Thanks
-jec

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



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



Problem with @Persist

2006-05-31 Thread Jean-Eric Cuendet (RPT)

Hi,
I have 2 pages, one with a list of Users (UsersPage) and another with 
Details for a given User (DetailsPage).


In UsersPage, I have a onEditUser() listener, which do:
  page = getDetailsPage()  // = With @InjectPage
  page.setUserId(selectedId);
  return page;

And in DetailsPage, I have:
  @Persist
  getUserId();
  setUserId(id);

But as soon as I have called *one* *time* the DetailsPage with a User (I 
clicked on onEditUser() DirectLink), the DetailsPage appears with the 
*first* user I selected, no matter if I go to UsersPage and select 
another user. It seems that the getUserId() method always return the 
first ID the page got the first time I used it.

This behaviour appears only in production, not on my DevMachine...
A...
Does anyone have a quick idea on what could caus that prolem?
Thanks a lot for any help.
-jec


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