webwork/src/main/webwork/dispatcher ServletDispatcher.java,1.64,1.65
[email protected] Fri, 31 Oct 2003 21:24:07 -0800
| Newsgroups | gmane.comp.java.open-symphony.cvs |
|---|---|
| Message-ID | <[email protected]> |
Update of /cvsroot/opensymphony/webwork/src/main/webwork/dispatcher
In directory sc8-pr-cvs1:/tmp/cvs-serv12299/src/main/webwork/dispatcher
Modified Files:
ServletDispatcher.java
Log Message:
Avoid looking up encoding every time
Index: ServletDispatcher.java
===================================================================
RCS file: /cvsroot/opensymphony/webwork/src/main/webwork/dispatcher/ServletDispatcher.java,v
retrieving revision 1.64
retrieving revision 1.65
diff -u -d -r1.64 -r1.65
--- ServletDispatcher.java 1 Nov 2003 05:18:30 -0000 1.64
+++ ServletDispatcher.java 1 Nov 2003 05:24:05 -0000 1.65
@@ -61,8 +61,9 @@
private static String saveDir;
private static Integer maxSize;
private static String actionExtension;
+ private String encoding;
- // HttpServlet overrides -----------------------------------------
+ // HttpServlet overrides -----------------------------------------
/**
* Initialize dispatcher servlet
*
@@ -126,6 +127,15 @@
actionExtension = ".action";
log.warn("Unable to find \'webwork.action.extension\' property setting. Defaulting to \'action\'");
}
+
+ try
+ {
+ encoding = Configuration.getString("webwork.i18n.encoding");
+ }
+ catch(IllegalArgumentException iae)
+ {
+ }
+
log.debug("action extension=" + actionExtension);
log.info("Action dispatcher initialized");
}
@@ -249,10 +259,11 @@
*/
private HttpServletRequest wrapRequest(HttpServletRequest request)
{
- try {
- request.setCharacterEncoding(Configuration.getString("webwork.i18n.encoding"));
- } catch (Exception e) {}
-
+ if(encoding!=null) {
+ try {
+ request.setCharacterEncoding(encoding);
+ } catch (Exception e) {}
+ }
// don't wrap more than once
if (request instanceof MultiPartRequestWrapper)
{
-------------------------------------------------------
This SF.net email is sponsored by: SF.net Giveback Program.
Does SourceForge.net help you be more productive? Does it
help you create better code? SHARE THE LOVE, and help us help
YOU! Click Here: http://sourceforge.net/donate/