diff --git a/zxingorg/src/com/google/zxing/web/DecodeServlet.java b/zxingorg/src/com/google/zxing/web/DecodeServlet.java index 2465e0794..eeb4b0f62 100644 --- a/zxingorg/src/com/google/zxing/web/DecodeServlet.java +++ b/zxingorg/src/com/google/zxing/web/DecodeServlet.java @@ -49,6 +49,7 @@ import java.net.MalformedURLException; import java.net.URI; import java.net.URISyntaxException; import java.net.URL; +import java.nio.charset.Charset; import java.util.ArrayList; import java.util.Arrays; import java.util.Collection; @@ -56,7 +57,6 @@ import java.util.EnumMap; import java.util.EnumSet; import java.util.List; import java.util.Map; -import java.util.logging.Level; import java.util.logging.Logger; import javax.imageio.ImageIO; @@ -100,7 +100,6 @@ public final class DecodeServlet extends HttpServlet { Logger logger = Logger.getLogger("com.google.zxing"); logger.addHandler(new ServletContextLogHandler(servletConfig.getServletContext())); diskFileItemFactory = new DiskFileItemFactory(); - log.info("DecodeServlet configured"); } @Override @@ -343,10 +342,12 @@ public final class DecodeServlet extends HttpServlet { return; } - if (request.getParameter("full") == null) { + String fullParameter = request.getParameter("full"); + boolean minimalOutput = fullParameter != null && !Boolean.parseBoolean(fullParameter); + if (minimalOutput) { response.setContentType("text/plain"); response.setCharacterEncoding("UTF8"); - Writer out = new OutputStreamWriter(response.getOutputStream(), "UTF8"); + Writer out = new OutputStreamWriter(response.getOutputStream(), Charset.forName("UTF-8")); try { for (Result result : results) { out.write(result.getText()); @@ -377,9 +378,4 @@ public final class DecodeServlet extends HttpServlet { } } - @Override - public void destroy() { - log.config("DecodeServlet shutting down..."); - } - } diff --git a/zxingorg/web/WEB-INF/web.xml b/zxingorg/web/WEB-INF/web.xml index 7cb55c0a0..62dbdf5aa 100644 --- a/zxingorg/web/WEB-INF/web.xml +++ b/zxingorg/web/WEB-INF/web.xml @@ -14,8 +14,10 @@ See the License for the specific language governing permissions and limitations under the License. --> - - + zxing.org diff --git a/zxingorg/web/w/analytics.jspx b/zxingorg/web/w/analytics.jspx index 7d764ab7b..5f65852dc 100644 --- a/zxingorg/web/w/analytics.jspx +++ b/zxingorg/web/w/analytics.jspx @@ -14,8 +14,8 @@ See the License for the specific language governing permissions and limitations under the License. --> - - + +