From: brian z. <bz...@zi...> - 2001-03-13 14:49:55
|
This works for me: #from javax.servlet import * from javax.servlet.http import HttpServlet #from java.io import * class Hello(HttpServlet): def doGet(self, req, res): res.setContentType("text/html") out =3D res.getWriter() out.println("<html><head><title>Hello World!</title></head>") out.println("<body><h1>Hello World!</h1></body></html>") Notice I added 'self' to doGet() as it's an instance method. Also, be=20 careful with the from xx import * notation as it's not really recommended. Save all this in= =20 a file called Hello.py and it should work. brian At 03:14 PM 3/13/2001 +0100, Eduardo Jesus Fernandez Corrales wrote: >Sure, there it goes. > >I am posting the generated file too, in case someone wants to check if it= =20 >runs. > >Thanks. > > > > >>> "brian zimmer" <bz...@zi...> 13/03/01 14:10 >>> > >It's hard to tell without the servlet file, but make sure the file= Hello.py > >has a single class called 'Hello' that extends from HttpServlet: > > > >class Hello(HttpServlet): > > ... > > > >Could you post the servlet code as this would help tremendously. > > > >hope this helps, > > > >brian > >-- >Eduardo J. Fern=E1ndez Corrales > > |