Package com.hascode.tutorial.servlet

Examples of com.hascode.tutorial.servlet.DatePrintServlet


  public void startServer() throws LifecycleException {
    Tomcat tomcat = new Tomcat();
    tomcat.setPort(8080);
    File base = new File(System.getProperty("java.io.tmpdir"));
    Context rootCtx = tomcat.addContext("/app", base.getAbsolutePath());
    Tomcat.addServlet(rootCtx, "dateServlet", new DatePrintServlet());
    rootCtx.addServletMapping("/date", "dateServlet");
    tomcat.start();
    tomcat.getServer().await();
  }
View Full Code Here

TOP

Related Classes of com.hascode.tutorial.servlet.DatePrintServlet

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.