struts-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From lukaszlen...@apache.org
Subject svn commit: r931828 - /struts/struts2/trunk/plugins/sitemesh/src/main/java/org/apache/struts2/sitemesh/FreemarkerDecoratorServlet.java
Date Thu, 08 Apr 2010 08:18:26 GMT
Author: lukaszlenart
Date: Thu Apr  8 08:18:25 2010
New Revision: 931828

URL: http://svn.apache.org/viewvc?rev=931828&view=rev
Log:
Improved log message

Modified:
    struts/struts2/trunk/plugins/sitemesh/src/main/java/org/apache/struts2/sitemesh/FreemarkerDecoratorServlet.java

Modified: struts/struts2/trunk/plugins/sitemesh/src/main/java/org/apache/struts2/sitemesh/FreemarkerDecoratorServlet.java
URL: http://svn.apache.org/viewvc/struts/struts2/trunk/plugins/sitemesh/src/main/java/org/apache/struts2/sitemesh/FreemarkerDecoratorServlet.java?rev=931828&r1=931827&r2=931828&view=diff
==============================================================================
--- struts/struts2/trunk/plugins/sitemesh/src/main/java/org/apache/struts2/sitemesh/FreemarkerDecoratorServlet.java
(original)
+++ struts/struts2/trunk/plugins/sitemesh/src/main/java/org/apache/struts2/sitemesh/FreemarkerDecoratorServlet.java
Thu Apr  8 08:18:25 2010
@@ -25,9 +25,12 @@ import com.opensymphony.module.sitemesh.
 import com.opensymphony.xwork2.ActionContext;
 import com.opensymphony.xwork2.util.logging.LoggerFactory;
 import freemarker.core.InvalidReferenceException;
-import freemarker.ext.jsp.TaglibFactory;
-import freemarker.ext.servlet.*;
-import freemarker.template.*;
+import freemarker.template.Configuration;
+import freemarker.template.ObjectWrapper;
+import freemarker.template.SimpleHash;
+import freemarker.template.Template;
+import freemarker.template.TemplateException;
+import freemarker.template.TemplateModel;
 import org.apache.struts2.ServletActionContext;
 import org.apache.struts2.StrutsStatics;
 import org.apache.struts2.dispatcher.Dispatcher;
@@ -40,14 +43,10 @@ import javax.servlet.ServletContext;
 import javax.servlet.ServletException;
 import javax.servlet.http.HttpServletRequest;
 import javax.servlet.http.HttpServletResponse;
-import javax.servlet.http.HttpSession;
 import java.io.FileNotFoundException;
 import java.io.IOException;
 import java.io.StringWriter;
-import java.text.SimpleDateFormat;
-import java.util.Calendar;
 import java.util.Enumeration;
-import java.util.GregorianCalendar;
 import java.util.Locale;
 
 /**
@@ -195,7 +194,7 @@ public class FreemarkerDecoratorServlet 
 
             StringBuilder msgBuf = new StringBuilder("Error applying freemarker template
to\n       request: ");
             msgBuf.append(req.getRequestURL());
-            if (req.getQueryString() == null) msgBuf.append("?").append(req.getQueryString());
+            if (req.getQueryString() != null) msgBuf.append("?").append(req.getQueryString());
             msgBuf.append(" with resultCode: ").append(resultCode).append(".\n\n").append(x.getMessage());
             String msg = msgBuf.toString();
             LOG.error(msg, x);



Mime
View raw message