Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [jetty-users] Embedded Jetty Servlet 3.0

This example project might help...

Look at the src/test/java/com/company/foo/ for an example on how to setup the server configuration for various Servlet 3.x features.

Also note, you should update your connector configuration.
Apache with mod_ajp (and Jetty with Ajp13Socket) is discouraged.  Use Apache with mod_proxy (and Jetty with standard connectors).
The mod_proxy configuration is much better supported and maintained, both at the Apache side, and at the Jetty side. (plus you'll see a performance boost)

Joakim Erdfelt <joakim@xxxxxxxxxxx>
Expert advice, services and support from from the Jetty & CometD experts

On Mon, Dec 2, 2013 at 6:47 AM, Ramirez, Edwin <edwin.ramirez@xxxxxxxx> wrote:

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();


        JettyHandler jh = new JettyHandler();
        jh.conf = conf;
        try {
        } catch(Exception e) {

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

Thank you.

Edwin S. Ramirez
Senior Developer, Information Technology
Mount Sinai Medical Center
875 Avenue of the Americas (6th Ave.)
New York, NY 10001

jetty-users mailing list

Back to the top