All Downloads are FREE. Search and download functionalities are using the official Maven repository.

org.safehaus.jettyjam.https.HelloWorldServlet Maven / Gradle / Ivy

Go to download

A simple https servlet that runs in an embedded jetty instance from an executable jar file without requiring the webapp to be exploded.

There is a newer version: 2.1.5
Show newest version
package org.safehaus.jettyjam.https;


import java.io.IOException;

import javax.servlet.ServletException;
import javax.servlet.http.HttpServlet;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;


/**
 * A simple servlet that prints out hello world.
 */
public class HelloWorldServlet extends HttpServlet {
    public static final String MESSAGE = "Hello World";

    @Override
    protected void doGet( final HttpServletRequest req, final HttpServletResponse resp )
            throws ServletException, IOException
    {
        resp.getOutputStream().print( MESSAGE );
        resp.flushBuffer();
    }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy