[opencms-dev] CVS HEAD - static export ignores locale

Martin Kuba makub at ics.muni.cz
Fri Jun 11 17:15:01 CEST 2004


On further investigation, I have found that the locale info
is stored in CmsObject in CmsRequestContext object,
and the CmsObject used during static export in
CmsJspLoader.export() method is the one created in
OpenCmsServlet.handle() method by calling

cms = OpenCmsCore.getInstance().initCmsObject(null, null, 
OpenCms.getDefaultUsers().getUserExport(), null);

That obviously doesn't provide the resource name
so the proper locale cannot be found.

But how can I get a proper CmsObject in that place ?

Martin

Martin Kuba wrote:
> Hi,
> 
> I am trying to figure out why static export ignores locale.
> I have put trace listings into CmsDefaultLocaleHandler.getI18nInfo()
> method and I have found, to my surprise, that it si not
> called during export, so it has no chance of finding the proper
> locale.
> 
> To be exact, it is called after I click "export" several times,
> but *always* with resourceName="//" and stack traces indicate
> that it is from various init methods like:


-- 
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Supercomputing Center Brno             Martin Kuba
Institute of Computer Science    email: makub at ics.muni.cz
Masaryk University             http://www.ics.muni.cz/~makub/
Botanicka 68a, 60200 Brno, CZ     mobil: +420-603-533775
--------------------------------------------------------------
-------------- next part --------------
A non-text attachment was scrubbed...
Name: smime.p7s
Type: application/x-pkcs7-signature
Size: 2847 bytes
Desc: S/MIME Cryptographic Signature
URL: <https://webmail.opencms.org/pipermail/opencms-dev/attachments/20040611/78f69e34/attachment.bin>


More information about the opencms-dev mailing list