db-derby-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Lynh Nguyen <lyn...@Remulak.Net>
Subject [PATCH] Network servlet display only message key
Date Thu, 02 Sep 2004 20:50:35 GMT
I'd like to suggest a patch addessing the message display on the 
servlet. Currently the servlet displays only message key. The message 
file for servlet messages is not picked up.
The patch will initialize the LocalizedResource object with the correct 
servlet message file and  will also remove unneeded reninitalize the 
LocalizedResource object.

Index: java/drda/org/apache/derby/drda/NetServlet.java
===================================================================
--- java/drda/org/apache/derby/drda/NetServlet.java     (revision 37226)
+++ java/drda/org/apache/derby/drda/NetServlet.java     (working copy)
@@ -81,7 +81,7 @@
               throws ServletException
       {

-               LocalizedResource langUtil = new LocalizedResource();
+               LocalizedResource langUtil = new 
LocalizedResource(null,null,SER
VLET_PROP_MESSAGES);

               String port = config.getInitParameter("portNumber");
               if (port != null) {
@@ -896,7 +896,6 @@
               locale = null;
               if (acceptLanguage == null)
               {
-               localUtil.init();
                       return localUtil;
               }
               // Use a tokenizer ot separate acceptable languages
@@ -917,7 +916,6 @@
                       }
               }
               // nothing worked use defaults
-        localUtil.init();
               return localUtil;

       }
Index: build.xml
===================================================================

I work for IBM and have worked for Derby for 3 months.


Mime
View raw message