Other Examples in Jython

DocumentationAndEducation

TableOfContents


Log4j

Apache Poi

PyServlet

See [http://seanmcgrath.blogspot.com/JythonWebAppTutorialPart1.html Sean McGrath's PyServlet Turorial] for an introduction. Below are a couple of examples:

Simple:

   1 from javax.servlet.http import HttpServlet
   2 
   3 class Simple(HttpServlet):
   4     def doGet(self, request, response):
   5         response.setContentType("text/plain")
   6         response.getWriter().println("Veni, vidi, vici!")

Using servlet context:

   1 from javax.servlet.http import HttpServlet
   2 
   3 class Simple(HttpServlet):     
   4     def doGet(self, request, response):
   5         response.setContentType("text/plain")
   6         response.getWriter().println(self.getServletContext().getServerInfo() +
   7                                      " Veni, vidi, vici!")