Project

General

Profile

Actions

Support #756

closed

WXmlLocalizedStrings - Glassfish shared library support

Added by Thim Anneessens almost 14 years ago. Updated over 13 years ago.

Status:
Closed
Priority:
Normal
Assignee:
Pieter Libin
Category:
-
Target version:
Start date:
03/14/2011
Due date:
% Done:

0%

Estimated time:

Description

Hello,

When deploying JWt in the shared library folder of a Glassfish domain (/lib), the localized string class does not find the xml ressources.

I think this is due to the fact that when shared, JWt classes have been loaded by another class loader than the app and that therefore they do not share the same classpath.

Kind regards,

Thim.

Actions #1

Updated by Thim Anneessens almost 14 years ago

And here is the trivial solution. I may not be the best but it works.

These modifications have to be done on the WXMLLocalizedStrings class

private void readXmlResource(String bundleName) {
        URL url = null;
        WApplication app= WApplication.getInstance();
        Class _class=app.getClass();
        for (String path : StringUtils.expandLocales(bundleName, WApplication.getInstance().getLocale().toString())) {
            url = _class.getResource(path + ".xml");

Kind regards,

Thim.

Actions #2

Updated by Koen Deforche over 13 years ago

  • Status changed from New to InProgress
  • Assignee set to Pieter Libin

Pieter,

can you verify this and review the patch ?

Regards,

koen

Actions #3

Updated by Pieter Libin over 13 years ago

  • Status changed from InProgress to Resolved

I applied the patch in the latest git.

Actions #4

Updated by Koen Deforche over 13 years ago

  • Status changed from Resolved to Closed
  • Target version set to 3.1.10
Actions

Also available in: Atom PDF