Hello,

I have created a simple application with Jetty embedded (see code below), and I 
would like to programatically setup the servlet version to 3.  In particular, I 
would like to use the multipart features in HttpServletRequest such as 
getParts(), in order to read uploaded files.

...
    void JettyStartup(TreeMap conf) {
        Server server = new Server();

        Ajp13SocketConnector ajp = new Ajp13SocketConnector();
        ajp.setPort(conf.getInt("Listener.service.port"));
        ajp.setHost("localhost");

        server.addConnector(ajp);

        JettyHandler jh = new JettyHandler();
        jh.conf = conf;
        server.setHandler(jh);
        try {
            server.start();
        } catch(Exception e) {
            e.printStackTrace();
        }
    }
...

public class JettyHandler extends AbstractHandler {
 public void handle(String target, Request baseRequest, HttpServletRequest 
request, HttpServletResponse response)
        throws IOException, ServletException
    {
        ...
        request.getParts();
        ...
    }
}


Thank you.

Edwin S. Ramirez
Senior Developer, Information Technology
Mount Sinai Medical Center

875 Avenue of the Americas (6th Ave.)
New York, NY 10001

Phone: 646-217-3112
Fax:  212-356-0085
_______________________________________________
jetty-users mailing list
[email protected]
https://dev.eclipse.org/mailman/listinfo/jetty-users

Reply via email to