Santiago Gala wrote: > Sergei O. Naumov wrote: > >> On Wed, 23 Jan 2002 19:07:23 +0100 >> Santiago Gala <[EMAIL PROTECTED]> wrote: >> >> >>>> This is precisely what I want but... I edited >>>> vm/layouts/html/default.vm >>>> and it affected only the page that gets displayed BEFORE a user >>>> logs in. >>>> After a user logs in it still shows a page without my changes. So, >>>> I wondered >>>> if this gets generated from an another template which I could not >>>> find. >>>> >>> Which version are you running? With current CVS (or a recent build) it >> >> >> 1.3a2. >> >>> looks impossible. So maybe we have a new bug. Also, check if you >>> restarted. It could be some funny caching issue with the session. >>> >> >> The funny thing is that it started working. Probably it really was a >> caching >> problem. The whole reason I need it is to add a <Meta> tag to force a >> browser >> Mozilla or IE to switch encoding to UTF-8. For some reason, adding it >> to does >> not make it switch - I always have to do it manually. Is there any >> other way >> I can do it? >> > I noticed that it got broken some time between 1.3a1 and 1.3a2. It > used to be set according to a JR.p parameter, with UTF-8 as default. > This is no longer true. I will try to restore the functionality. Las > time I looked at it, I thought that we should add an element to the > media registry to hold the content encoding for a media type. WAP, for > instance, will typically be UTF-8, as it is XML. For HTML I would > recommend UTF-8 when there is a possibility of having content in > several langauges at the same time in the portal. But there is people > who insist in having it in iso-8859-1. > > This would simplify the coding, since Content-Encoding should be set > around the beginning of doBuild() in JetspeedLayout.java, > JetspeedJspLayout.java and (maybe) JetspeedTemplateLocatorService.java, > making the call as > > ... > data.setContentType( cm.getPreferredType().toString() ); > data.setCharSet("XXX");
Commenting on myself ;), I found that it was set in the Layout and the TemplateLocator, about six times per page, when it should be put in the Page just once. I don't have it clean yet, but I'm getting closer. > > Could you try to test if it works this way and report here? A patch if > you don't find problems would be great ;). Initially you could just > use a constant for testing. If everything works we can make it > pluggable through the media registry and CapabilityMap classes. > > It could give problems, though I think it should work. There are > tricky issues depending on when the Writer on the Response get asked > from the servlet engine and on how we initialize Velocity or jsp > templates. > > >> >> Sergei >> >> >> -- >> 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]> -- To unsubscribe, e-mail: <mailto:[EMAIL PROTECTED]> For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>