writing servlets with JPython
borisg at captura.com
borisg at captura.com
Tue Aug 1 18:29:35 EDT 2000
I am trying to write a servlet in JPython. My very simple test
looks like this:
from javax.servlet import *
from javax.servlet.http import *
from java.io import *
class HelloWorldServlet(HttpServlet):
def service(req, res):
res.setContentType("text/html")
out = res.getWriter()
out.println("<html><head><title>Hello World!</title></head>")
out.println("<body><h1>Hello World!</h1></body></html>")
This compiles (with jpythonc) and deploys just fine, but when I
try to call it I get an exception: "HelloWorldServlet does not
implement javax.servlet.Servlet". Java version of the class,
which extends HttpServlet, works.
Any ideas?
boris
Sent via Deja.com http://www.deja.com/
Before you buy.
More information about the Python-list
mailing list