incubator-sling-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From fmesc...@apache.org
Subject svn commit: r617458 - /incubator/sling/trunk/launchpad/launchpad-servlets/src/main/java/org/apache/sling/launchpad/servlets/UjaxInfoServlet.java
Date Fri, 01 Feb 2008 10:45:14 GMT
Author: fmeschbe
Date: Fri Feb  1 02:45:07 2008
New Revision: 617458

URL: http://svn.apache.org/viewvc?rev=617458&view=rev
Log:
1. Return from doGet after sending the error response
2. Get the Writer from the servlet container and do not create it ourselves,
    this allows for better controll of the correct character encoding used by
    the writer and sent to the client

Modified:
    incubator/sling/trunk/launchpad/launchpad-servlets/src/main/java/org/apache/sling/launchpad/servlets/UjaxInfoServlet.java

Modified: incubator/sling/trunk/launchpad/launchpad-servlets/src/main/java/org/apache/sling/launchpad/servlets/UjaxInfoServlet.java
URL: http://svn.apache.org/viewvc/incubator/sling/trunk/launchpad/launchpad-servlets/src/main/java/org/apache/sling/launchpad/servlets/UjaxInfoServlet.java?rev=617458&r1=617457&r2=617458&view=diff
==============================================================================
--- incubator/sling/trunk/launchpad/launchpad-servlets/src/main/java/org/apache/sling/launchpad/servlets/UjaxInfoServlet.java
(original)
+++ incubator/sling/trunk/launchpad/launchpad-servlets/src/main/java/org/apache/sling/launchpad/servlets/UjaxInfoServlet.java
Fri Feb  1 02:45:07 2008
@@ -56,11 +56,13 @@
 
         if (data== null) {
             response.sendError(HttpServletResponse.SC_NOT_FOUND,request.getPathInfo());
+            return;
         }
         
         // render data in JSON format
         response.setContentType("application/json");
-        final Writer out = new OutputStreamWriter(response.getOutputStream());
+        response.setCharacterEncoding("UTF-8");
+        final Writer out = response.getWriter();
         final JSONWriter w = new JSONWriter(out);
         try {
             w.object();



Mime
View raw message