You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@nutch.apache.org by "Markus Jelsma (JIRA)" <ji...@apache.org> on 2011/04/01 16:57:06 UTC

[jira] [Closed] (NUTCH-164) Locale (language) choice by first session has global effect to all sessions

     [ https://issues.apache.org/jira/browse/NUTCH-164?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Markus Jelsma closed NUTCH-164.
-------------------------------

    Resolution: Won't Fix

Bulk close of legacy issues:
http://www.lucidimagination.com/search/document/2738eeb014805854/clean_up_open_legacy_issues_in_jira

> Locale (language) choice by first session has global effect to all sessions
> ---------------------------------------------------------------------------
>
>                 Key: NUTCH-164
>                 URL: https://issues.apache.org/jira/browse/NUTCH-164
>             Project: Nutch
>          Issue Type: Bug
>          Components: web gui
>    Affects Versions: 0.7.1
>         Environment: any
>            Reporter: KuroSaka TeruHiko
>
> Here's a report posted on nutch-users ML by Sergio [redsun@redsun.homeip.net] on 1/02/2006:
> >>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>
> I just installed nutch in a Fedora Core 3 server.
> Once installed, I crawled a small site to test it. I opened my navigator
> (mozilla 1.7 which reports by default ES-ES locales, and everything was ok).
> Then I asked a friend of mine  (the owner of the server) to test it. He did
> a search with an EN-US locale navigator, and the search page appeared in
> Spanish.
> After a few hours, I did the following: I restarted tomcat, I changed the
> locale of my mozilla to EN, and I opened the search page. Now I always get
> English search page even if I open with a mozilla ES-ES locale.
> I wrote a message to my friend:
> "nutch keeps the locale of the first navigator that makes a request for all
> other requests. By this reason, yesterday as the first request was from my
> ES locale browser, you saw the page in Spanish with your browser that
> reports EN locale. There is a way to make this work:
> * Making sure that, after the server is restarted, the first request is done
> by a browser that reports EN locale."
> <<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<
> This happened in my environment too.  After taking a look the code, I believe this is caused by
> use of the default message bundle in search.jsp.  The code snipplet looks like:
>     <i18n:bundle baseName="org.nutch.jsp.search"/>
>     ...
>     <title>Nutch: <i18n:message key="title"/></title>
>     ...
> The default message bundle probably has the application scope.  Because of that, the first
> setting of the language has global effect to every session created afterward.
> The right fix is to limit the scope to the session by inserting the scope specifier, as in:
> <i18n:bundle scope="session" baseName="org.nutch.jsp.search"/>
> Other JSP files need to be inspected for the same issue and should be fixed as well.

--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira