From: <bc...@wo...> - 2001-12-22 19:03:36
|
[Updike, Clark] >I've submitted the post below twice to jyt...@li... >(last night and again just now) and it doesn't show up. Also, I'm not >getting a bounced email either. What up? I've noticed that the SF mail lists are very slow at the moment. >TIA, >Clark (please reply to mailto:cla...@jh...) > >p.s. Barry, I worked with your bro Craig at C1 until I left in September. > >Subject: 2.1b2 PyServlet.loadServlet 'invalid syntax' >Sent: 12/22/2001 10:28 AM > Importance: Normal >I'm trying to run the Hello.py servlet example but I get the exception from >PyServlet.loadServlet() shown below. The strange thing is that I can >execute the statement execfile('C:\\Program Files\\Apache Tomcat >4.0\\webapps\\JythonServlet\\Hello.py') from the interactive interpreter >without getting the 'invalid syntax' problem (which I think shows that the >path is valid). I agree. That was a good test. >Anyone have any ideas? > >TIA, >Clark > >javax.servlet.ServletException: Could not create Jython servletTraceback >(innermost last): > (no code object) at line 0 >SyntaxError: ('invalid syntax', ('C:\\Program Files\\Apache Tomcat >4.0\\webapps\\JythonServlet\\Hello.py', 3, 9, ' class >Hello(javax.servlet.http.HttpServlet):')) I notice the spaces (or tabs) before the class statement in the error message. Does the source file have any whitespace there? It mostly likely shouldn't have any. regards, finn |