X-Git-Url: http://erislabs.net/gitweb/?a=blobdiff_plain;f=source%2Fmircoders%2Fservlet%2FServletModuleProducer.java;h=b6216603f046ffa1ca8e45dc95813a220a9bc4a8;hb=00bfd76517d039070b0e126b8f4f200e8b692ed0;hp=0fe5755e196cb1b317bad6562beddcd956253eb5;hpb=d96e301d3d5b64037f4bd72c12e6ac0f7de69ec7;p=mir.git diff --git a/source/mircoders/servlet/ServletModuleProducer.java b/source/mircoders/servlet/ServletModuleProducer.java index 0fe5755e..b6216603 100755 --- a/source/mircoders/servlet/ServletModuleProducer.java +++ b/source/mircoders/servlet/ServletModuleProducer.java @@ -1,5 +1,5 @@ /* - * Copyright (C) 2001, 2002 The Mir-coders group + * Copyright (C) 2001, 2002 The Mir-coders group * * This file is part of Mir. * @@ -18,17 +18,15 @@ * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA * * In addition, as a special exception, The Mir-coders gives permission to link - * the code of this program with the com.oreilly.servlet library, any library - * licensed under the Apache Software License, The Sun (tm) Java Advanced - * Imaging library (JAI), The Sun JIMI library (or with modified versions of - * the above that use the same license as the above), and distribute linked - * combinations including the two. You must obey the GNU General Public - * License in all respects for all of the code used other than the above - * mentioned libraries. If you modify this file, you may extend this exception - * to your version of the file, but you are not obligated to do so. If you do - * not wish to do so, delete this exception statement from your version. + * the code of this program with any library licensed under the Apache Software License, + * The Sun (tm) Java Advanced Imaging library (JAI), The Sun JIMI library + * (or with modified versions of the above that use the same license as the above), + * and distribute linked combinations including the two. You must obey the + * GNU General Public License in all respects for all of the code used other than + * the above mentioned libraries. If you modify this file, you may extend this + * exception to your version of the file, but you are not obligated to do so. + * If you do not wish to do so, delete this exception statement from your version. */ - package mircoders.servlet; import java.io.PrintWriter; @@ -46,9 +44,7 @@ import mir.generator.Generator; import mir.log.LoggerWrapper; import mir.producer.ProducerFactory; import mir.servlet.ServletModule; -import mir.servlet.ServletModuleExc; import mir.servlet.ServletModuleFailure; -import mir.util.NullWriter; import mir.util.ResourceBundleGeneratorFunction; import mircoders.global.MirGlobal; @@ -70,7 +66,7 @@ public class ServletModuleProducer extends ServletModule generator = MirGlobal.localizer().generators().makeAdminGeneratorLibrary().makeGenerator(aGeneratorIdentifier); MirGlobal.localizer().producerAssistant().initializeGenerationValueSet(aResponseData); aResponseData.put( "lang", new ResourceBundleGeneratorFunction( aLocale, MessageResources.getMessageResources("bundles.admin"))); - generator.generate(aWriter, aResponseData, new PrintWriter(new NullWriter())); + generator.generate(aWriter, aResponseData, logger); } catch (Throwable t) { throw new ServletModuleFailure(t); @@ -108,7 +104,7 @@ public class ServletModuleProducer extends ServletModule try { generator = MirGlobal.localizer().generators().makeAdminGeneratorLibrary().makeGenerator("producerqueue.template"); - generationData = ServletHelper.makeGenerationData(getLocale(aRequest)); + generationData = ServletHelper.makeGenerationData(new Locale[] { getLocale(aRequest), getFallbackLocale(aRequest)}); generationData.put( "thisurl", "module=Producer&do=showProducerQueueStatus"); producersData = new Vector(); @@ -136,7 +132,7 @@ public class ServletModuleProducer extends ServletModule generationData.put("producers", producersData); generationData.put("queue", MirGlobal.producerEngine().getQueueStatus()); - generator.generate(aResponse.getWriter(), generationData, new PrintWriter(new NullWriter())); + generator.generate(aResponse.getWriter(), generationData, logger); } catch (Throwable t) { throw new ServletModuleFailure(t);