1. opensymphony
  2. webwork

Commits

jcarreira  committed e7239c7

Making the WebWorkVelocityServlet handle the lack of the i18n property in webwork.properties without failing.

git-svn-id: http://svn.opensymphony.com/svn/webwork/trunk@314573baa09-0c28-0410-bef9-dab3c582ae83

  • Participants
  • Parent commits a3f4685
  • Branches master

Comments (0)

Files changed (1)

File src/java/com/opensymphony/webwork/views/velocity/WebWorkVelocityServlet.java

View file
  • Ignore whitespace
     private String getEncoding()
     {
         // todo look into converting this to using XWork/WebWork2 encoding rules
-        if (Configuration.getString("webwork.i18n.encoding") != null)
+        try {
             return Configuration.getString("webwork.i18n.encoding");
-        else
+        } catch (IllegalArgumentException e) {
             return RuntimeSingleton.getString(RuntimeSingleton.OUTPUT_ENCODING, DEFAULT_OUTPUT_ENCODING);
+        }
     }
 
     /**