Set the servlet's defaultEncoding to the app's charset
as soon as we get the Application reference.
This commit is contained in:
parent
b8dd92a125
commit
c444ada032
2 changed files with 4 additions and 0 deletions
|
@ -55,6 +55,8 @@ public final class EmbeddedServletClient extends AbstractServletClient {
|
||||||
ResponseTrans execute(RequestTrans req) throws Exception {
|
ResponseTrans execute(RequestTrans req) throws Exception {
|
||||||
if (app == null) {
|
if (app == null) {
|
||||||
app = Server.getServer().getApplication(appName);
|
app = Server.getServer().getApplication(appName);
|
||||||
|
// get the app's charset
|
||||||
|
defaultEncoding = app.getCharset();
|
||||||
}
|
}
|
||||||
|
|
||||||
return app.execute(req);
|
return app.execute(req);
|
||||||
|
|
|
@ -92,6 +92,8 @@ public final class StandaloneServletClient extends AbstractServletClient {
|
||||||
app = new Application(appName, appHome, dbHome);
|
app = new Application(appName, appHome, dbHome);
|
||||||
app.init();
|
app.init();
|
||||||
app.start();
|
app.start();
|
||||||
|
// get the app's charset
|
||||||
|
defaultEncoding = app.getCharset();
|
||||||
} catch (Exception x) {
|
} catch (Exception x) {
|
||||||
log("Error starting Application " + appName + ": " + x);
|
log("Error starting Application " + appName + ": " + x);
|
||||||
x.printStackTrace();
|
x.printStackTrace();
|
||||||
|
|
Loading…
Add table
Reference in a new issue