You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@struts.apache.org by "Ted Husted (JIRA)" <ji...@apache.org> on 2006/07/01 17:27:17 UTC

[jira] Created: (STR-2897) Rework Locale Resolution

Rework Locale Resolution
------------------------

         Key: STR-2897
         URL: http://issues.apache.org/struts/browse/STR-2897
     Project: Struts 1
        Type: Improvement

    Reporter: Ted Husted
     Fix For: TBD


Struts 1 locale resolution could be improvied to work more like Cantoo [http://messages.cintoo.org/] and Struts 2. 

Ideally, we should be able to share locale resolution between s1, s2, and Spring, in the same application. 

For background see, 

 WW/SAF2 i18n & Cintoo Messages 
* http://www.mail-archive.com/dev%40struts.apache.org/msg23270.html 

Locale resolver 
* http://www.mail-archive.com/dev%40struts.apache.org/msg23273.html


-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
   http://issues.apache.org/struts/secure/Administrators.jspa
-
For more information on JIRA, see:
   http://www.atlassian.com/software/jira


[jira] Updated: (STR-2897) Rework Locale Resolution

Posted by "Paul Benedict (JIRA)" <ji...@apache.org>.
     [ http://issues.apache.org/struts/browse/STR-2897?page=all ]

Paul Benedict updated STR-2897:
-------------------------------

    Attachment: str-2897-patch-2.txt

Attached is take 2 on the locale resolution. Here are the talking points:

* Deleted the ActionLocaleContextHolder class and family.

* Moved resolver packages up to "org.apache.struts.locale" and deleted the "resolver" subpackage.

* Shortened interface name to LocaleResolver. It was originally called ActionLocaleResolver so that it could play nicely with Spring's own LocaleResolver, but the name is just too long and FQN will have to do if they want to use each other.

* The "localeResolverClass" property of the Controller now can accept shorthand mnemonics like "cookie", "session", etc. See LocaleUtils for more information.

* Controller also has a new property "defaultLocale" which allows the specified resolver to be given default fallback locale if the resolver cannot determine the locale by its own strategy.

* New RequestParameterLocaleResolver class to resolve the locale temporarily by a request parameter.

* New CompositeLocaleResolver to chain strategies together.

* New StandardLocaleResolver as the default resolution strategy if none specified.

* JSTL automatic fallback is removed. It is now it's own resolver (JstlLocaleResolver) to give developers the freedom to employ it (or not).

> Rework Locale Resolution
> ------------------------
>
>                 Key: STR-2897
>                 URL: http://issues.apache.org/struts/browse/STR-2897
>             Project: Struts 1
>          Issue Type: Improvement
>          Components: Core, Taglibs
>    Affects Versions: 1.3.5
>            Reporter: Ted Husted
>         Assigned To: Paul Benedict
>             Fix For: 1.3.7
>
>         Attachments: str-2897-patch-2.txt, str-2897-patch.txt
>
>
> Struts 1 locale resolution could be improvied to work more like Cantoo [http://messages.cintoo.org/] and Struts 2. 
> Ideally, we should be able to share locale resolution between s1, s2, and Spring, in the same application. 
> For background see, 
>  WW/SAF2 i18n & Cintoo Messages 
> * http://www.mail-archive.com/dev%40struts.apache.org/msg23270.html 
> Locale resolver 
> * http://www.mail-archive.com/dev%40struts.apache.org/msg23273.html

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://issues.apache.org/struts/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] Commented: (STR-2897) Rework Locale Resolution

Posted by "Paul Benedict (JIRA)" <ji...@apache.org>.
    [ http://issues.apache.org/struts/browse/STR-2897?page=comments#action_37634 ] 

Paul Benedict commented on STR-2897:
------------------------------------

Since Struts 2.0 uses Spring, my question to the 2.0 team is how much of Spring is Struts allowed to use?

If we want to "take it easy", then I recommend we use these classes:

http://static.springframework.org/spring/docs/1.2.x/api/org/springframework/web/servlet/i18n/AcceptHeaderLocaleResolver.html
http://static.springframework.org/spring/docs/1.2.x/api/org/springframework/web/servlet/i18n/CookieLocaleResolver.html
http://static.springframework.org/spring/docs/1.2.x/api/org/springframework/web/servlet/i18n/FixedLocaleResolver.html
http://static.springframework.org/spring/docs/1.2.x/api/org/springframework/web/servlet/i18n/SessionLocaleResolver.html

Let it be known, they set a key in the request like org.springframework.* . Does that matter to anyone it's not a Struts key?

I don't mind coming up with an interface that duplicates the base Spring LocaleResolver interface (2 methods), but I do believe we should look-up this interface with reflection so Spring subclasses can join in.

Paul

> Rework Locale Resolution
> ------------------------
>
>          Key: STR-2897
>          URL: http://issues.apache.org/struts/browse/STR-2897
>      Project: Struts 1
>         Type: Improvement

>     Reporter: Ted Husted
>      Fix For: TBD

>
> Struts 1 locale resolution could be improvied to work more like Cantoo [http://messages.cintoo.org/] and Struts 2. 
> Ideally, we should be able to share locale resolution between s1, s2, and Spring, in the same application. 
> For background see, 
>  WW/SAF2 i18n & Cintoo Messages 
> * http://www.mail-archive.com/dev%40struts.apache.org/msg23270.html 
> Locale resolver 
> * http://www.mail-archive.com/dev%40struts.apache.org/msg23273.html

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
   http://issues.apache.org/struts/secure/Administrators.jspa
-
For more information on JIRA, see:
   http://www.atlassian.com/software/jira


[jira] Updated: (STR-2897) Rework Locale Resolution

Posted by "Paul Benedict (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/struts/browse/STR-2897?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Paul Benedict updated STR-2897:
-------------------------------

    Assignee:     (was: Paul Benedict)

> Rework Locale Resolution
> ------------------------
>
>                 Key: STR-2897
>                 URL: https://issues.apache.org/struts/browse/STR-2897
>             Project: Struts 1
>          Issue Type: Improvement
>          Components: Core, Taglibs
>    Affects Versions: 1.3.5
>            Reporter: Ted Husted
>             Fix For: 1.4.1
>
>         Attachments: str-2897-patch-2.txt, str-2897-patch.txt
>
>
> Struts 1 locale resolution could be improvied to work more like Cantoo [http://messages.cintoo.org/] and Struts 2. 
> Ideally, we should be able to share locale resolution between s1, s2, and Spring, in the same application. 
> For background see, 
>  WW/SAF2 i18n & Cintoo Messages 
> * http://www.mail-archive.com/dev%40struts.apache.org/msg23270.html 
> Locale resolver 
> * http://www.mail-archive.com/dev%40struts.apache.org/msg23273.html

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Commented: (STR-2897) Rework Locale Resolution

Posted by "Paul Benedict (JIRA)" <ji...@apache.org>.
    [ http://issues.apache.org/struts/browse/STR-2897?page=comments#action_37652 ] 

Paul Benedict commented on STR-2897:
------------------------------------

Okay, then I think I know what to do. Because S1/S2 has no shared architecture, I think the best solution is to come up with [A] differing implementations that [B] function identically and [C] function cooperatively.

1. Since Struts 1 does not have dependency injection, the locale resolver class needs to be specified in the struts controller. So I want to add a new element to the struts config file.

2. The resolver will not be accessible directly. It must be accessed through a proxy class. This proxy class will use dynamic reflection to detect these methods:
http://static.springframework.org/spring/docs/1.2.x/api/org/springframework/web/servlet/LocaleResolver.html

We can swipe the interface (Apache 2.0 License) and provide it ourselves. That way people can implement it directly, but I heavy lean towards reflection to read the resolver object so that Spring implementations can be used too. This will allow S1/SPR/WW to be used together. That might sound a bit crazy, but people may have S1/S2 actions working with SPR portlet framework. This will allow people to provide any locale setting implementation they want.

3. Modify the RP/commands were appropriate to setup the locale on each request.

4. Deprecrate ActionForm.setLocale() for new version as in comment #2.

> Rework Locale Resolution
> ------------------------
>
>          Key: STR-2897
>          URL: http://issues.apache.org/struts/browse/STR-2897
>      Project: Struts 1
>         Type: Improvement

>     Reporter: Ted Husted
>      Fix For: TBD

>
> Struts 1 locale resolution could be improvied to work more like Cantoo [http://messages.cintoo.org/] and Struts 2. 
> Ideally, we should be able to share locale resolution between s1, s2, and Spring, in the same application. 
> For background see, 
>  WW/SAF2 i18n & Cintoo Messages 
> * http://www.mail-archive.com/dev%40struts.apache.org/msg23270.html 
> Locale resolver 
> * http://www.mail-archive.com/dev%40struts.apache.org/msg23273.html

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
   http://issues.apache.org/struts/secure/Administrators.jspa
-
For more information on JIRA, see:
   http://www.atlassian.com/software/jira


[jira] Updated: (STR-2897) Rework Locale Resolution

Posted by "Paul Benedict (JIRA)" <ji...@apache.org>.
     [ http://issues.apache.org/struts/browse/STR-2897?page=all ]

Paul Benedict updated STR-2897:
-------------------------------

        Fix Version/s: 1.3.6
                           (was: Future)
    Affects Version/s: 1.3.5
             Assignee: Paul Benedict

> Rework Locale Resolution
> ------------------------
>
>                 Key: STR-2897
>                 URL: http://issues.apache.org/struts/browse/STR-2897
>             Project: Struts 1
>          Issue Type: Improvement
>    Affects Versions: 1.3.5
>            Reporter: Ted Husted
>         Assigned To: Paul Benedict
>             Fix For: 1.3.6
>
>
> Struts 1 locale resolution could be improvied to work more like Cantoo [http://messages.cintoo.org/] and Struts 2. 
> Ideally, we should be able to share locale resolution between s1, s2, and Spring, in the same application. 
> For background see, 
>  WW/SAF2 i18n & Cintoo Messages 
> * http://www.mail-archive.com/dev%40struts.apache.org/msg23270.html 
> Locale resolver 
> * http://www.mail-archive.com/dev%40struts.apache.org/msg23273.html

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://issues.apache.org/struts/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] Commented: (STR-2897) Rework Locale Resolution

Posted by "Paul Benedict (JIRA)" <ji...@apache.org>.
    [ http://issues.apache.org/struts/browse/STR-2897?page=comments#action_37966 ] 
            
Paul Benedict commented on STR-2897:
------------------------------------

Does anyone have a response to this?

1. The RP/Command will be configured with class name of the locale resolver to instantiate and use on each request.

2. This configuration can be done on each action too. This means the RP/Command will first defer to the resolver of the action, if it is not null, or else use the application-wide resolver.

Waiting to hear!

> Rework Locale Resolution
> ------------------------
>
>                 Key: STR-2897
>                 URL: http://issues.apache.org/struts/browse/STR-2897
>             Project: Struts 1
>          Issue Type: Improvement
>            Reporter: Ted Husted
>             Fix For: Future
>
>
> Struts 1 locale resolution could be improvied to work more like Cantoo [http://messages.cintoo.org/] and Struts 2. 
> Ideally, we should be able to share locale resolution between s1, s2, and Spring, in the same application. 
> For background see, 
>  WW/SAF2 i18n & Cintoo Messages 
> * http://www.mail-archive.com/dev%40struts.apache.org/msg23270.html 
> Locale resolver 
> * http://www.mail-archive.com/dev%40struts.apache.org/msg23273.html

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://issues.apache.org/struts/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] Updated: (STR-2897) Rework Locale Resolution

Posted by "Paul Benedict (JIRA)" <ji...@apache.org>.
     [ http://issues.apache.org/struts/browse/STR-2897?page=all ]

Paul Benedict updated STR-2897:
-------------------------------

    Fix Version/s: 1.3.7
                       (was: 1.3.6)

> Rework Locale Resolution
> ------------------------
>
>                 Key: STR-2897
>                 URL: http://issues.apache.org/struts/browse/STR-2897
>             Project: Struts 1
>          Issue Type: Improvement
>          Components: Core, Taglibs
>    Affects Versions: 1.3.5
>            Reporter: Ted Husted
>         Assigned To: Paul Benedict
>             Fix For: 1.3.7
>
>         Attachments: str-2897-patch.txt
>
>
> Struts 1 locale resolution could be improvied to work more like Cantoo [http://messages.cintoo.org/] and Struts 2. 
> Ideally, we should be able to share locale resolution between s1, s2, and Spring, in the same application. 
> For background see, 
>  WW/SAF2 i18n & Cintoo Messages 
> * http://www.mail-archive.com/dev%40struts.apache.org/msg23270.html 
> Locale resolver 
> * http://www.mail-archive.com/dev%40struts.apache.org/msg23273.html

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://issues.apache.org/struts/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] Updated: (STR-2897) Rework Locale Resolution

Posted by "Paul Benedict (JIRA)" <ji...@apache.org>.
     [ http://issues.apache.org/struts/browse/STR-2897?page=all ]

Paul Benedict updated STR-2897:
-------------------------------

    Attachment: str-2897-patch.txt

Patch provided

> Rework Locale Resolution
> ------------------------
>
>                 Key: STR-2897
>                 URL: http://issues.apache.org/struts/browse/STR-2897
>             Project: Struts 1
>          Issue Type: Improvement
>    Affects Versions: 1.3.5
>            Reporter: Ted Husted
>         Assigned To: Paul Benedict
>             Fix For: 1.3.6
>
>         Attachments: str-2897-patch.txt
>
>
> Struts 1 locale resolution could be improvied to work more like Cantoo [http://messages.cintoo.org/] and Struts 2. 
> Ideally, we should be able to share locale resolution between s1, s2, and Spring, in the same application. 
> For background see, 
>  WW/SAF2 i18n & Cintoo Messages 
> * http://www.mail-archive.com/dev%40struts.apache.org/msg23270.html 
> Locale resolver 
> * http://www.mail-archive.com/dev%40struts.apache.org/msg23273.html

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://issues.apache.org/struts/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] Updated: (STR-2897) Rework Locale Resolution

Posted by "Paul Benedict (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/struts/browse/STR-2897?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Paul Benedict updated STR-2897:
-------------------------------

    Fix Version/s:     (was: 1.3.7)
                   1.4.0

> Rework Locale Resolution
> ------------------------
>
>                 Key: STR-2897
>                 URL: https://issues.apache.org/struts/browse/STR-2897
>             Project: Struts 1
>          Issue Type: Improvement
>          Components: Core, Taglibs
>    Affects Versions: 1.3.5
>            Reporter: Ted Husted
>         Assigned To: Paul Benedict
>             Fix For: 1.4.0
>
>         Attachments: str-2897-patch-2.txt, str-2897-patch.txt
>
>
> Struts 1 locale resolution could be improvied to work more like Cantoo [http://messages.cintoo.org/] and Struts 2. 
> Ideally, we should be able to share locale resolution between s1, s2, and Spring, in the same application. 
> For background see, 
>  WW/SAF2 i18n & Cintoo Messages 
> * http://www.mail-archive.com/dev%40struts.apache.org/msg23270.html 
> Locale resolver 
> * http://www.mail-archive.com/dev%40struts.apache.org/msg23273.html

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Commented: (STR-2897) Rework Locale Resolution

Posted by "Niall Pemberton (JIRA)" <ji...@apache.org>.
    [ http://issues.apache.org/struts/browse/STR-2897?page=comments#action_38878 ] 
            
Niall Pemberton commented on STR-2897:
--------------------------------------

Current Struts 1 Scenario
=========================

I think its worth laying out currently what Struts1 provides (since I had to look it up to remind myself the details)

1) Setting the ControllerConfig's "locale" property to "true" causes the SelectLocale command(1.3) or RequestProcessor(1.2) to store the Locale from the HttpServletRequest under key Globals.LOCALE_KEY in the session (if a value isn't already there).

2) Users can specifically set the Locale (store it under Globals.LOCALE_KEY in the session) using the Action's setLocale(HttpServletRequest) convenience method.

3) The Struts Taglibs, ValidatorForm and Action access (either directly or indirectly) the stored Locale via the RequestUtils.getUserLocale(HttpServletRequest, localeKey) method (not sure what tiles does, somthing slightly different I think).

TODO: Look at what current tiles and Standalone Tiles do?


Features of the Enhancement
===========================
The attached patch is pretty big and it would be easier if the aims of the enhancement are clearly laid out - looking at the patch there seems to be two aims:

1) Provide a plugable mechanism for storing and resolving the Locale - on an application wide basis:
   - Request Header (read-only)
   - A fixed specified default locale (read-only)
   - Stored in the Session (as per current functionality)
   - Stored in a Cookie

2) Provide access to the Locale throughout the Web Application via a ThreadLocale variable

It would be nice if the "motivation" for this feature was explained. From memory one motivation was to remove the need to have a "Session" to store the Locale (hence the Cookie functionality).


What Paul's Patch Does
======================

(summary of the relevant parts IMO)

1) New "Resolver" type
 - ActionLocaleResolver - interface with methods to set and retrieve the Locale
 - 4 ActionLocaleResolver implementations (request header, fixed, Session and Cookie)

2) Resolver Configuration
 - new "localeResolverClass" attribute on the ControllerConfig to specify the ActionLocaleResolver implementation to use (on an application wide basis).
 - The resolver is instantiated and initalized in each RequestProcessor

3) ActionContext - getLocaleResolver() method added

4) ComposableRequestProcessor(1.3) - store the "ActionLocaleResolver" in the ActionContext

5) SelectLocale(1.3) Command
 - Retireve the "ActionLocaleResolver" from the HttpServletRequest
 - Store the "ActionLocaleResolver" in a ThreadLocale variable
 - Store the "Locale" returned by the "ActionLocaleResolver" in the ActionContext

6) RequestProcessor(1.2)
 - init() method: cache the "ActionLocaleResolver"
 - processLocale() method:
    - store the "ActionLocaleResolver" in the HttpServletRequest
    - store the "ActionLocaleResolver" in a ThreadLocale variable

7) CookieGenerator - new class for managing http Cookies

8) LocaleUtils - utility class for Locale, includes providing getLocale(HttpServletRequest) method (to replace RequestUtils((HttpServletRequest, localeKey) method?)


Comments on the Feature
=======================
Having different mechanisms for resolving the Locale is a good idea and the four implementations provided offer a good standard feature set.

One area that might be worth consideration is the limitation of having one strategy (i.e. resolver) for the whole application. Especially since the Cookie implementation is dependant on the user configuring to allow Cookies. I guess that this could be resolved by someone creating a  "Cookie if allowed, otherwise Session" implementation.

I'm not convinced that we need to store the locale resolver in three places (Request, ActionContext and ThreadLocale) seems like making this overly complex if Struts internally is only going to ever retrieve it from one place (I assume Taglibs etc are going to get it from the Request, but since their changes are not included in the patch, this is a guess). I would say lets keep it simple for now and store it in the Request only (or request and ActionContext) - any user wanting it in a ThreadLocale can easily add a Command to do that.

Comments on the Patch
=====================

Some general observations:

- patches which include your local path are a pain to review
  (I had to remove the "C:/Dev/workspace/struts-" prefix to apply the patch and look at it)
- patch should stick to the coding convention of using four spaces to indent
- quite a few lines are flagged as changed that are not really 
   (for example, just because the indentation was altered).
  This makes reviewing the patch a pain - since it adds additional noise to the diffs.


1) ActionServlet - maybe these changes are all unecessary (or need to be different) - see following comments.

2) RequestProcessor - adding an additional init() method is completely unnecessary. If the ActionLocaleResolver is instantiated in the RequestProcessors's existing init() method, rather than the ActionServlet. As a general principle we should not change the API, deprecating existing methods, when it can be done without inflicting any pain on the user.

3) I think theres a bug in the ComposableRequestProcessor/SelectLocale implementation - ComposableRequestProcessor is storing the "ActionLocaleResolver" in the ActionContext but SelectLocale is then try to retrieve it from the HttpServletRequest (where it hasn't been stored) and also store it in the ActionContext.

All this is unnecessarily complex anyway - why not just instantiate the locale resolver in the ActionServlet and store it in application scope? The RequestProcessor(1.2)/Command(1.3) could just then retrieve it from application scope and store it in the request and ActionContext. I also don't think we should change the existing AbatractSelectLocale/SelectLocale commands - lets just create new Command(s) for this if they're needed. That way anyone depending on the existing Command's behaviour can carry on using them - thats one of the beauty of the Command feature - you can configure different flavours. I also think that RequestUtils (or its LocaleUtils replacement) should support both the old and new feature - i.e. look for a locale resolver and use that if its there - otherwise if theres a session and it has the Locale, use that. Maybe thats a way of providing Cookie locale storage with Session as a backup?

4) ActionLocaleContext - this class I just don't get at all. Why have this as an extra layer rather than just putting the actual "ActionLocaleResolver" directly in the ThreadLocale variable? Having said that, as I said before I'd rather leave the ThreadLocale variable out if were not actually going to reference it in Struts internally.


Generally looks like a good thing to do, but I think the actual implementation needs some more work before its ready to implement.


> Rework Locale Resolution
> ------------------------
>
>                 Key: STR-2897
>                 URL: http://issues.apache.org/struts/browse/STR-2897
>             Project: Struts 1
>          Issue Type: Improvement
>          Components: Core, Taglibs
>    Affects Versions: 1.3.5
>            Reporter: Ted Husted
>         Assigned To: Paul Benedict
>             Fix For: 1.3.7
>
>         Attachments: str-2897-patch.txt
>
>
> Struts 1 locale resolution could be improvied to work more like Cantoo [http://messages.cintoo.org/] and Struts 2. 
> Ideally, we should be able to share locale resolution between s1, s2, and Spring, in the same application. 
> For background see, 
>  WW/SAF2 i18n & Cintoo Messages 
> * http://www.mail-archive.com/dev%40struts.apache.org/msg23270.html 
> Locale resolver 
> * http://www.mail-archive.com/dev%40struts.apache.org/msg23273.html

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://issues.apache.org/struts/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] Updated: (STR-2897) Rework Locale Resolution

Posted by "Paul Benedict (JIRA)" <ji...@apache.org>.
     [ http://issues.apache.org/struts/browse/STR-2897?page=all ]

Paul Benedict updated STR-2897:
-------------------------------

    Component/s: Core
                 Taglibs

> Rework Locale Resolution
> ------------------------
>
>                 Key: STR-2897
>                 URL: http://issues.apache.org/struts/browse/STR-2897
>             Project: Struts 1
>          Issue Type: Improvement
>          Components: Core, Taglibs
>    Affects Versions: 1.3.5
>            Reporter: Ted Husted
>         Assigned To: Paul Benedict
>             Fix For: 1.3.6
>
>         Attachments: str-2897-patch.txt
>
>
> Struts 1 locale resolution could be improvied to work more like Cantoo [http://messages.cintoo.org/] and Struts 2. 
> Ideally, we should be able to share locale resolution between s1, s2, and Spring, in the same application. 
> For background see, 
>  WW/SAF2 i18n & Cintoo Messages 
> * http://www.mail-archive.com/dev%40struts.apache.org/msg23270.html 
> Locale resolver 
> * http://www.mail-archive.com/dev%40struts.apache.org/msg23273.html

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://issues.apache.org/struts/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] Commented: (STR-2897) Rework Locale Resolution

Posted by "Niall Pemberton (JIRA)" <ji...@apache.org>.
    [ http://issues.apache.org/struts/browse/STR-2897?page=comments#action_38879 ] 
            
Niall Pemberton commented on STR-2897:
--------------------------------------

P.S. I know Spring as ASL2 licensed, so theres no problem copying the code - but if we do we just need to make sure that we are complying with their license - I posted a quesiton on legal-discuss and got this answer:

    http://tinyurl.com/sk7mr

> Rework Locale Resolution
> ------------------------
>
>                 Key: STR-2897
>                 URL: http://issues.apache.org/struts/browse/STR-2897
>             Project: Struts 1
>          Issue Type: Improvement
>          Components: Core, Taglibs
>    Affects Versions: 1.3.5
>            Reporter: Ted Husted
>         Assigned To: Paul Benedict
>             Fix For: 1.3.7
>
>         Attachments: str-2897-patch.txt
>
>
> Struts 1 locale resolution could be improvied to work more like Cantoo [http://messages.cintoo.org/] and Struts 2. 
> Ideally, we should be able to share locale resolution between s1, s2, and Spring, in the same application. 
> For background see, 
>  WW/SAF2 i18n & Cintoo Messages 
> * http://www.mail-archive.com/dev%40struts.apache.org/msg23270.html 
> Locale resolver 
> * http://www.mail-archive.com/dev%40struts.apache.org/msg23273.html

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://issues.apache.org/struts/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] Commented: (STR-2897) Rework Locale Resolution

Posted by "Ted Husted (JIRA)" <ji...@apache.org>.
    [ http://issues.apache.org/struts/browse/STR-2897?page=comments#action_37645 ] 

Ted Husted commented on STR-2897:
---------------------------------

Right now, S2 is not "married" to Spring, and the goal is to allow other dependecy injection factories to be used instead. 

As long as the key can be injected, I don't see that the symbol would be a technical problem. The question would be whether the strategy is coupled to Spring (through more than a symbolic constant). 

> Rework Locale Resolution
> ------------------------
>
>          Key: STR-2897
>          URL: http://issues.apache.org/struts/browse/STR-2897
>      Project: Struts 1
>         Type: Improvement

>     Reporter: Ted Husted
>      Fix For: TBD

>
> Struts 1 locale resolution could be improvied to work more like Cantoo [http://messages.cintoo.org/] and Struts 2. 
> Ideally, we should be able to share locale resolution between s1, s2, and Spring, in the same application. 
> For background see, 
>  WW/SAF2 i18n & Cintoo Messages 
> * http://www.mail-archive.com/dev%40struts.apache.org/msg23270.html 
> Locale resolver 
> * http://www.mail-archive.com/dev%40struts.apache.org/msg23273.html

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
   http://issues.apache.org/struts/secure/Administrators.jspa
-
For more information on JIRA, see:
   http://www.atlassian.com/software/jira


[jira] Commented: (STR-2897) Rework Locale Resolution

Posted by "Paul Benedict (JIRA)" <ji...@apache.org>.
    [ http://issues.apache.org/struts/browse/STR-2897?page=comments#action_37643 ] 

Paul Benedict commented on STR-2897:
------------------------------------

Current method:
ActionForm.setLocale(HttpServletRequest, Locale) 

Will have to be deprecated in favor of:
ActionForm.setLocale(HttpServletRequest, HttpServletResponse, Locale). 

Cookie strategies require setting cookies in the response.



> Rework Locale Resolution
> ------------------------
>
>          Key: STR-2897
>          URL: http://issues.apache.org/struts/browse/STR-2897
>      Project: Struts 1
>         Type: Improvement

>     Reporter: Ted Husted
>      Fix For: TBD

>
> Struts 1 locale resolution could be improvied to work more like Cantoo [http://messages.cintoo.org/] and Struts 2. 
> Ideally, we should be able to share locale resolution between s1, s2, and Spring, in the same application. 
> For background see, 
>  WW/SAF2 i18n & Cintoo Messages 
> * http://www.mail-archive.com/dev%40struts.apache.org/msg23270.html 
> Locale resolver 
> * http://www.mail-archive.com/dev%40struts.apache.org/msg23273.html

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
   http://issues.apache.org/struts/secure/Administrators.jspa
-
For more information on JIRA, see:
   http://www.atlassian.com/software/jira