From c444ada032044ae89a5ee8fe241c9ae8b0601bad Mon Sep 17 00:00:00 2001 From: hns Date: Mon, 6 Sep 2004 13:50:08 +0000 Subject: [PATCH] Set the servlet's defaultEncoding to the app's charset as soon as we get the Application reference. --- src/helma/servlet/EmbeddedServletClient.java | 2 ++ src/helma/servlet/StandaloneServletClient.java | 2 ++ 2 files changed, 4 insertions(+) diff --git a/src/helma/servlet/EmbeddedServletClient.java b/src/helma/servlet/EmbeddedServletClient.java index b03c88d5..98e53b1e 100644 --- a/src/helma/servlet/EmbeddedServletClient.java +++ b/src/helma/servlet/EmbeddedServletClient.java @@ -55,6 +55,8 @@ public final class EmbeddedServletClient extends AbstractServletClient { ResponseTrans execute(RequestTrans req) throws Exception { if (app == null) { app = Server.getServer().getApplication(appName); + // get the app's charset + defaultEncoding = app.getCharset(); } return app.execute(req); diff --git a/src/helma/servlet/StandaloneServletClient.java b/src/helma/servlet/StandaloneServletClient.java index bbde3ac0..9d3a28cc 100644 --- a/src/helma/servlet/StandaloneServletClient.java +++ b/src/helma/servlet/StandaloneServletClient.java @@ -92,6 +92,8 @@ public final class StandaloneServletClient extends AbstractServletClient { app = new Application(appName, appHome, dbHome); app.init(); app.start(); + // get the app's charset + defaultEncoding = app.getCharset(); } catch (Exception x) { log("Error starting Application " + appName + ": " + x); x.printStackTrace();