Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorChris Goldthorpe2009-12-01 20:00:09 +0000
committerChris Goldthorpe2009-12-01 20:00:09 +0000
commit86921939818fadb6b29a7f729c74da637b5fcfb8 (patch)
treee373b84aaf45a775f7ffa7999a0ed41c47d2c7d0
parent4e84d864163b6e36de5bcaa5708ea42669bf1849 (diff)
downloadeclipse.platform.ua-86921939818fadb6b29a7f729c74da637b5fcfb8.tar.gz
eclipse.platform.ua-86921939818fadb6b29a7f729c74da637b5fcfb8.tar.xz
eclipse.platform.ua-86921939818fadb6b29a7f729c74da637b5fcfb8.zip
Bug 291933 – Context Servlet does not honor browser Locale when running in Infocenter Mode:
-rw-r--r--org.eclipse.help.webapp/index.jsp4
-rw-r--r--org.eclipse.help.webapp/src/org/eclipse/help/internal/webapp/servlet/ContentServlet.java5
-rw-r--r--org.eclipse.help.webapp/src/org/eclipse/help/internal/webapp/servlet/ContextServlet.java2
-rw-r--r--org.eclipse.help.webapp/src/org/eclipse/help/internal/webapp/servlet/IndexServlet.java4
-rw-r--r--org.eclipse.help.webapp/src/org/eclipse/help/internal/webapp/servlet/SearchServlet.java3
-rw-r--r--org.eclipse.help.webapp/src/org/eclipse/help/internal/webapp/servlet/TocServlet.java2
6 files changed, 15 insertions, 5 deletions
diff --git a/org.eclipse.help.webapp/index.jsp b/org.eclipse.help.webapp/index.jsp
index 4c231e08f..7b7fc1d28 100644
--- a/org.eclipse.help.webapp/index.jsp
+++ b/org.eclipse.help.webapp/index.jsp
@@ -1,5 +1,5 @@
<%--
- Copyright (c) 2000, 2004 IBM Corporation and others.
+ Copyright (c) 2000, 2009 IBM Corporation and others.
All rights reserved. This program and the accompanying materials
are made available under the terms of the Eclipse Public License v1.0
which accompanies this distribution, and is available at
@@ -11,8 +11,8 @@
<%@ page import="org.eclipse.help.internal.webapp.data.*" errorPage="/advanced/err.jsp" contentType="text/html; charset=UTF-8"%>
<%
request.setCharacterEncoding("UTF-8");
- LayoutData data = new LayoutData(application,request, response);
ServerState.webappStarted(application,request, response);
+ LayoutData data = new LayoutData(application,request, response);
if (request.getParameter("noscript") != null) {
request.getRequestDispatcher("/basic/index.jsp" + data.getQuery()).forward(request, response);
diff --git a/org.eclipse.help.webapp/src/org/eclipse/help/internal/webapp/servlet/ContentServlet.java b/org.eclipse.help.webapp/src/org/eclipse/help/internal/webapp/servlet/ContentServlet.java
index bc29fe4f2..c0e8d4196 100644
--- a/org.eclipse.help.webapp/src/org/eclipse/help/internal/webapp/servlet/ContentServlet.java
+++ b/org.eclipse.help.webapp/src/org/eclipse/help/internal/webapp/servlet/ContentServlet.java
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright (c) 2000, 2007 IBM Corporation and others.
+ * Copyright (c) 2000, 2009 IBM Corporation and others.
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
@@ -14,6 +14,8 @@ import java.io.*;
import javax.servlet.*;
import javax.servlet.http.*;
+
+import org.eclipse.help.internal.base.BaseHelpSystem;
/**
* Servlet to interface client with remote Eclipse
*/
@@ -38,6 +40,7 @@ public class ContentServlet extends HttpServlet {
protected void doGet(HttpServletRequest req, HttpServletResponse resp)
throws ServletException, IOException {
req.setCharacterEncoding("UTF-8"); //$NON-NLS-1$
+ BaseHelpSystem.checkMode();
if (connector != null) {
connector.transfer(req, resp);
}
diff --git a/org.eclipse.help.webapp/src/org/eclipse/help/internal/webapp/servlet/ContextServlet.java b/org.eclipse.help.webapp/src/org/eclipse/help/internal/webapp/servlet/ContextServlet.java
index 53f4bd0e1..1e736768e 100644
--- a/org.eclipse.help.webapp/src/org/eclipse/help/internal/webapp/servlet/ContextServlet.java
+++ b/org.eclipse.help.webapp/src/org/eclipse/help/internal/webapp/servlet/ContextServlet.java
@@ -23,6 +23,7 @@ import org.eclipse.help.IContext2;
import org.eclipse.help.IHelpResource;
import org.eclipse.help.internal.HelpPlugin;
import org.eclipse.help.internal.Topic;
+import org.eclipse.help.internal.base.BaseHelpSystem;
import org.eclipse.help.internal.context.Context;
import org.eclipse.help.internal.webapp.data.UrlUtil;
@@ -39,6 +40,7 @@ public class ContextServlet extends HttpServlet {
protected void doGet(HttpServletRequest req, HttpServletResponse resp)
throws ServletException, IOException {
+ BaseHelpSystem.checkMode();
String locale = UrlUtil.getLocale(req, resp);
req.setCharacterEncoding("UTF-8"); //$NON-NLS-1$
resp.setContentType("application/xml; charset=UTF-8"); //$NON-NLS-1$
diff --git a/org.eclipse.help.webapp/src/org/eclipse/help/internal/webapp/servlet/IndexServlet.java b/org.eclipse.help.webapp/src/org/eclipse/help/internal/webapp/servlet/IndexServlet.java
index 652a1c9dc..3da5a4926 100644
--- a/org.eclipse.help.webapp/src/org/eclipse/help/internal/webapp/servlet/IndexServlet.java
+++ b/org.eclipse.help.webapp/src/org/eclipse/help/internal/webapp/servlet/IndexServlet.java
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright (c) 2000, 2007 IBM Corporation and others.
+ * Copyright (c) 2000, 2009 IBM Corporation and others.
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
@@ -21,6 +21,7 @@ import javax.servlet.http.HttpServletResponse;
import javax.xml.transform.TransformerException;
import org.eclipse.help.internal.HelpPlugin;
+import org.eclipse.help.internal.base.BaseHelpSystem;
import org.eclipse.help.internal.dynamic.DocumentWriter;
import org.eclipse.help.internal.index.Index;
import org.eclipse.help.internal.index.IndexContribution;
@@ -43,6 +44,7 @@ public class IndexServlet extends HttpServlet {
protected void doGet(HttpServletRequest req, HttpServletResponse resp)
throws ServletException, IOException {
+ BaseHelpSystem.checkMode();
String locale = UrlUtil.getLocale(req, resp);
req.setCharacterEncoding("UTF-8"); //$NON-NLS-1$
resp.setContentType("application/xml; charset=UTF-8"); //$NON-NLS-1$
diff --git a/org.eclipse.help.webapp/src/org/eclipse/help/internal/webapp/servlet/SearchServlet.java b/org.eclipse.help.webapp/src/org/eclipse/help/internal/webapp/servlet/SearchServlet.java
index 68625b985..10113bd96 100644
--- a/org.eclipse.help.webapp/src/org/eclipse/help/internal/webapp/servlet/SearchServlet.java
+++ b/org.eclipse.help.webapp/src/org/eclipse/help/internal/webapp/servlet/SearchServlet.java
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright (c) 2000, 2008 IBM Corporation and others.
+ * Copyright (c) 2000, 2009 IBM Corporation and others.
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
@@ -52,6 +52,7 @@ public class SearchServlet extends HttpServlet {
protected void doGet(HttpServletRequest req, HttpServletResponse resp)
throws ServletException, IOException {
+ BaseHelpSystem.checkMode();
String locale = UrlUtil.getLocale(req, resp);
req.setCharacterEncoding("UTF-8"); //$NON-NLS-1$
resp.setContentType("application/xml; charset=UTF-8"); //$NON-NLS-1$
diff --git a/org.eclipse.help.webapp/src/org/eclipse/help/internal/webapp/servlet/TocServlet.java b/org.eclipse.help.webapp/src/org/eclipse/help/internal/webapp/servlet/TocServlet.java
index ece57b7c0..4e99944a7 100644
--- a/org.eclipse.help.webapp/src/org/eclipse/help/internal/webapp/servlet/TocServlet.java
+++ b/org.eclipse.help.webapp/src/org/eclipse/help/internal/webapp/servlet/TocServlet.java
@@ -21,6 +21,7 @@ import javax.servlet.http.HttpServletResponse;
import javax.xml.transform.TransformerException;
import org.eclipse.help.internal.HelpPlugin;
+import org.eclipse.help.internal.base.BaseHelpSystem;
import org.eclipse.help.internal.dynamic.DocumentWriter;
import org.eclipse.help.internal.toc.Toc;
import org.eclipse.help.internal.toc.TocContribution;
@@ -43,6 +44,7 @@ public class TocServlet extends HttpServlet {
protected void doGet(HttpServletRequest req, HttpServletResponse resp)
throws ServletException, IOException {
+ BaseHelpSystem.checkMode();
String locale = UrlUtil.getLocale(req, resp);
req.setCharacterEncoding("UTF-8"); //$NON-NLS-1$
resp.setContentType("application/xml; charset=UTF-8"); //$NON-NLS-1$

Back to the top