Does anyone know how to run Jetty9 with a simple core in a Java class ??? For example, I saw programs such as:
public static void main(String[] args) throws Exception { Server server = new Server(8080); WebAppContext webAppContext = new WebAppContext("./src/main/webapp", "/recruiting"); webAppContext.setLogUrlOnStart(true); webAppContext.setInitParameter(ContextLoader.CONTEXT_CLASS_PARAM, RecruitingAppContext.class.getName()); webAppContext.addServlet(DispatcherServlet.class, "/"); webAppContext.setWelcomeFiles(new String[]{"index.jsp"}); webAppContext.addEventListener(new RequestContextListener()); webAppContext.configure(); server.setHandler(webAppContext); server.start(); System.out.println("Server started"); server.join(); }
But I still could not successfully launch Jetty9. Anyway, I'm trying to do this with spring. Someone let me see some examples to do this ??? Thank you very much: -)
source share