Posted By

thebugslayer on 06/04/07


Tagged

server servlet webapp


Versions (?)

Tiny WebContainer/Server


 / Published in: Groovy
 

  1. //Needs both jetty.jar and jett-util.jar
  2. import org.mortbay.jetty.*
  3. import org.mortbay.jetty.servlet.*
  4. import groovy.servlet.*
  5.  
  6. def server = new Server(8080)
  7. def root = new Context(server,"/",Context.SESSIONS)
  8. root.setResourceBase(".")
  9. root.addServlet(new ServletHolder(new TemplateServlet()), "*.html")
  10. server.start()

Report this snippet  

You need to login to post a comment.