nutch-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "KuroSaka TeruHiko (JIRA)" <j...@apache.org>
Subject [jira] Created: (NUTCH-164) Locale (language) choice by first session has global effect to all sessions
Date Wed, 04 Jan 2006 18:53:00 GMT
Locale (language) choice by first session has global effect to all sessions
---------------------------------------------------------------------------

         Key: NUTCH-164
         URL: http://issues.apache.org/jira/browse/NUTCH-164
     Project: Nutch
        Type: Bug
  Components: web gui  
    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.
-
If you think it was sent incorrectly contact one of the administrators:
   http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see:
   http://www.atlassian.com/software/jira


Mime
View raw message