Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSimone Bordet2016-02-09 16:50:26 +0000
committerSimone Bordet2016-02-09 16:50:26 +0000
commit145e4bee7139125408acc7388bf58531e96ae3d7 (patch)
tree161d14637db1ccd94ad025c0825d1b8a93ccf52a /jetty-servlet
parente853632c2210eaf5225dd48618b482004dab38ef (diff)
downloadorg.eclipse.jetty.project-145e4bee7139125408acc7388bf58531e96ae3d7.tar.gz
org.eclipse.jetty.project-145e4bee7139125408acc7388bf58531e96ae3d7.tar.xz
org.eclipse.jetty.project-145e4bee7139125408acc7388bf58531e96ae3d7.zip
487511 - Jetty HTTP won't work on turkish systems.jetty-9.2.x
Fixed usages of toLowerCase() and toUpperCase() to use Locale.ENGLISH.
Diffstat (limited to 'jetty-servlet')
-rw-r--r--jetty-servlet/src/main/java/org/eclipse/jetty/servlet/JspPropertyGroupServlet.java33
1 files changed, 17 insertions, 16 deletions
diff --git a/jetty-servlet/src/main/java/org/eclipse/jetty/servlet/JspPropertyGroupServlet.java b/jetty-servlet/src/main/java/org/eclipse/jetty/servlet/JspPropertyGroupServlet.java
index 6394a5bae1..aa14e2c3dd 100644
--- a/jetty-servlet/src/main/java/org/eclipse/jetty/servlet/JspPropertyGroupServlet.java
+++ b/jetty-servlet/src/main/java/org/eclipse/jetty/servlet/JspPropertyGroupServlet.java
@@ -19,6 +19,7 @@
package org.eclipse.jetty.servlet;
import java.io.IOException;
+import java.util.Locale;
import javax.servlet.GenericServlet;
import javax.servlet.ServletException;
@@ -35,37 +36,37 @@ import org.eclipse.jetty.util.resource.Resource;
/* ------------------------------------------------------------ */
/** Servlet handling JSP Property Group mappings
* <p>
- * This servlet is mapped to by any URL pattern for a JSP property group.
+ * This servlet is mapped to by any URL pattern for a JSP property group.
* Resources handled by this servlet that are not directories will be passed
- * directly to the JSP servlet. Resources that are directories will be
+ * directly to the JSP servlet. Resources that are directories will be
* passed directly to the default servlet.
*/
public class JspPropertyGroupServlet extends GenericServlet
{
private static final long serialVersionUID = 3681783214726776945L;
-
+
public final static String NAME = "__org.eclipse.jetty.servlet.JspPropertyGroupServlet__";
private final ServletHandler _servletHandler;
private final ContextHandler _contextHandler;
private ServletHolder _dftServlet;
private ServletHolder _jspServlet;
private boolean _starJspMapped;
-
+
public JspPropertyGroupServlet(ContextHandler context, ServletHandler servletHandler)
{
_contextHandler=context;
- _servletHandler=servletHandler;
+ _servletHandler=servletHandler;
}
-
+
@Override
public void init() throws ServletException
- {
+ {
String jsp_name = "jsp";
ServletMapping servlet_mapping =_servletHandler.getServletMapping("*.jsp");
if (servlet_mapping!=null)
{
_starJspMapped=true;
-
+
//now find the jsp servlet, ignoring the mapping that is for ourself
ServletMapping[] mappings = _servletHandler.getServletMappings();
for (ServletMapping m:mappings)
@@ -80,11 +81,11 @@ public class JspPropertyGroupServlet extends GenericServlet
}
}
}
-
+
jsp_name=servlet_mapping.getServletName();
}
_jspServlet=_servletHandler.getServlet(jsp_name);
-
+
String dft_name="default";
ServletMapping default_mapping=_servletHandler.getServletMapping("/");
if (default_mapping!=null)
@@ -94,7 +95,7 @@ public class JspPropertyGroupServlet extends GenericServlet
@Override
public void service(ServletRequest req, ServletResponse res) throws ServletException, IOException
- {
+ {
HttpServletRequest request = null;
if (req instanceof HttpServletRequest)
request = (HttpServletRequest)req;
@@ -118,27 +119,27 @@ public class JspPropertyGroupServlet extends GenericServlet
servletPath = request.getServletPath();
pathInfo = request.getPathInfo();
}
-
+
String pathInContext=URIUtil.addPaths(servletPath,pathInfo);
-
+
if (pathInContext.endsWith("/"))
{
_dftServlet.getServlet().service(req,res);
}
- else if (_starJspMapped && pathInContext.toLowerCase().endsWith(".jsp"))
+ else if (_starJspMapped && pathInContext.toLowerCase(Locale.ENGLISH).endsWith(".jsp"))
{
_jspServlet.getServlet().service(req,res);
}
else
{
-
+
Resource resource = _contextHandler.getResource(pathInContext);
if (resource!=null && resource.isDirectory())
_dftServlet.getServlet().service(req,res);
else
_jspServlet.getServlet().service(req,res);
}
-
+
}
}

Back to the top