Minor cleanup of yellow compile warnings

This commit is contained in:
Joakim Erdfelt 2013-09-11 07:24:20 -07:00
parent ddb2629d8c
commit 09f01963ca
6 changed files with 6 additions and 7 deletions

View File

@ -112,7 +112,7 @@ public class ManyHandlers
{
public void handle(String target, Request baseRequest, HttpServletRequest request, HttpServletResponse response) throws IOException, ServletException
{
Map params = request.getParameterMap();
Map<String,String[]> params = request.getParameterMap();
if (params.size() > 0)
{
response.setContentType("text/plain");

View File

@ -42,6 +42,7 @@ public class MinimalServlets
server.join();
}
@SuppressWarnings("serial")
public static class HelloServlet extends HttpServlet
{
@Override

View File

@ -32,9 +32,10 @@ public class OneServletContext
context.setContextPath("/");
server.setHandler(context);
// Server content from tmp
// Serve content from java.io.tmpdir
ServletHolder holder = context.addServlet(org.eclipse.jetty.servlet.DefaultServlet.class,"/tmp/*");
holder.setInitParameter("resourceBase","/tmp");
String tmpDir = System.getProperty("java.io.tmpdir");
holder.setInitParameter("resourceBase",tmpDir);
holder.setInitParameter("pathInfoOnly","true");
// A Dump Servlet

View File

@ -19,9 +19,7 @@
package org.eclipse.jetty.embedded;
import org.eclipse.jetty.security.HashLoginService;
import org.eclipse.jetty.server.Connector;
import org.eclipse.jetty.server.Server;
import org.eclipse.jetty.server.ServerConnector;
import org.eclipse.jetty.webapp.WebAppContext;
public class OneWebApp

View File

@ -32,6 +32,7 @@ public class ProxyServer
Server server = new Server();
ServerConnector connector = new ServerConnector(server);
connector.setPort(8888);
server.addConnector(connector);
// Setup proxy handler to handle CONNECT methods
ConnectHandler proxy = new ConnectHandler();

View File

@ -19,8 +19,6 @@
package org.eclipse.jetty.embedded;
import java.util.Collections;
import java.util.HashSet;
import java.util.Set;
import org.eclipse.jetty.security.ConstraintMapping;
import org.eclipse.jetty.security.ConstraintSecurityHandler;