Bug 7376 - ResourceBundle algorithm not function as specified.
Summary: ResourceBundle algorithm not function as specified.
Status: CLOSED INVALID
Alias: None
Product: Taglibs
Classification: Unclassified
Component: Standard Taglib (show other bugs)
Version: unspecified
Hardware: All All
: P3 major (vote)
Target Milestone: ---
Assignee: Tomcat Developers Mailing List
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2002-03-22 22:25 UTC by Ryan Lubke
Modified: 2004-11-16 19:05 UTC (History)
0 users



Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Ryan Lubke 2002-03-22 22:25:44 UTC
JSTL PD Spec, page 8-74 example 3.

Given the preferred locales: ja, en_UK, en_US, en_CA, fr
Fallback local: en
Resource Bundles: Resources_en, Resources_fr, Resources_en_US

The algoright should find a language match against en_UK and set
the resource bundle to Resources_en, but instead, it proceeds further
through the preferred locales and gives an exact match against en_US.

Example output:
**********************************************************

REQUEST:

[java] TRACE: REQUEST: GET
/test/resourceBundleLookup.jsp?res=AlgoResources4&fall=en HTTP/1.0
     [java] REQUEST HEADER: Content-Language: ja, en_UK, en_US, en_CA, fr
     [java] REQUEST HEADER: Host: localhost:8080

RESPONSE:

     [java] Unable to find the expected header: 'message: en message' in the
server's response.
     [java] ERROR: The following headers were received: 
     [java] ERROR: 	HEADER -> Connection: close
     [java] ERROR: 	HEADER -> Date: Fri, 22 Mar 2002 22:08:32 GMT
     [java] ERROR: 	HEADER -> Content-Type: text/html;charset=ISO-8859-1
     [java] ERROR: 	HEADER -> Content-Language: en-US
     [java] ERROR: 	HEADER -> message: en_US message
     [java] ERROR: 	HEADER -> Server: Apache Coyote HTTP/1.1 Connector [1.0]
Comment 1 Ryan Lubke 2002-03-23 00:22:15 UTC
Used incorrect request header for preferred locales.