[MAGNOLIA-425] MessagesManager does not correctly load JSTL Localization in init() Created: 08/Jun/05  Updated: 17/Mar/09  Resolved: 09/Jun/05

Status: Closed
Project: Magnolia
Component/s: core
Affects Version/s: None
Fix Version/s: 2.1 Final

Type: Bug Priority: Major
Reporter: Titus Barik Assignee: Philipp Bärfuss
Resolution: Fixed Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified
Environment:

Resin 3.0.13; and all other J2EE containers that use Config.FMT_LOCALIZATION_CONTEXT without scope.


Attachments: File messagesmanager.patch    
Template:
Acceptance criteria:
Empty
Task DoD:
[ ]* Doc/release notes changes? Comment present?
[ ]* Downstream builds green?
[ ]* Solution information and context easily available?
[ ]* Tests
[ ]* FixVersion filled and not yet released
[ ]  Architecture Decision Record (ADR)
Bug DoR:
[ ]* Steps to reproduce, expected, and actual results filled
[ ]* Affected version filled
Date of First Response:

 Description   

Problem is as follows:

context.setAttribute(Config.FMT_LOCALIZATION_CONTEXT + ".application", MessagesManager.DEFAULT_BASENAME);

only works on JSTL implementations which append the REQUEST_SCOPE (.application) in the servlet context.

Resin and some other J2EE containers do not do this. For these containers, you must instead use:

context.setAttribute(Config.FMT_LOCALIZATION_CONTEXT, MessagesManager.DEFAULT_BASENAME);

without the appended .application.

The solution is to do both in the init() method.

This issue also arises in the Spring Framework, see:
http://www.javaresearch.org/source/spring1.0.2/org/springframework/web/servlet/support/JstlUtils.java.html



 Comments   
Comment by Titus Barik [ 08/Jun/05 ]

Patch enclosed; does both methods of settings (Config.FMT_LOCALIZATION_CONTEXT.

Comment by Philipp Bracher [ 09/Jun/05 ]

thanks: patched

Generated at Mon Feb 12 03:17:18 CET 2024 using Jira 9.4.2#940002-sha1:46d1a51de284217efdcb32434eab47a99af2938b.