|
Auto-reload fails on Echo PyServlet: msg#00009lang.jython.user
I apologize in advance; I'm a newbie (and more than a bit clueless about how PyServlet works). I've written a tiny python script served by PyServlet that uses the supremely useful Echo framework (echo.sf.net). It works, but, for some reason, it doesn't have the ultra-cool reloads-when-you-make-changes feature of the other "hello world" PyServlets I've played with. In other words, I've created the "hello world" servlet described here: http://seanmcgrath.blogspot.com/JythonWebAppTutorialPart1.html (specifically, JythonServlet1.py), and the servlet reflects changes as soon as I save the .py file. But with the Echo servlet I've written, I have to restart Tomcat for changes to show up. Here 'tis: --- cut here --- JythonServletEchoTest.py --- cut here --- from nextapp.echo2.webcontainer import WebContainerServlet import nextapp.echo2.app.ApplicationInstance import nextapp.echo2.app.ContentPane from nextapp.echo2.app import Extent from nextapp.echo2.app import Label from nextapp.echo2.app import Row import nextapp.echo2.app.Window class JythonServletEchoTest (WebContainerServlet): def newApplicationInstance(self): return TestApp() class TestApp(nextapp.echo2.app.ApplicationInstance): def init(self): mainWindow = nextapp.echo2.app.Window() mainWindow.setTitle("Echo2+Jython Test") mainWindow.setContent(testPane()) return mainWindow class testPane(nextapp.echo2.app.ContentPane): def __init__(self): nextapp.echo2.app.ContentPane.__init__(self) self.add(Label("Hello world!")) --- cut here --- JythonServletEchoTest.py --- cut here --- WebContainerServlet is a subclass of HttpServlet, so I'd think this should operate similarly to the JythonServlet1 example. But it doesn't: if I change "Hello world!" to something else, I have to restart Tomcat for the servlet to reflect that. Obviously, it wouldn't be fair to ask for a solution (since this isn't an Echo forum), but I'm curious if someone can give me an idea of where to look in Jython/PyServlet to see why the auto-reload feature isn't working. After all, PyServlet is processing the .py file -- surely, it must be involved, whether I pass the request to HttpServlet, Echo's WebContainerServlet, or whatever. How it could fail is the area where I'm curious. I'm using tomcat 4.1, debian unstable, java version "1.4.2_06" Java(TM) 2 Runtime Environment, Standard Edition (build 1.4.2_06-b03) Java HotSpot(TM) Client VM (build 1.4.2_06-b03, mixed mode) Any suggestions would be much appreciated. thanks in advance! --Joe ------------------------------------------------------- This SF.Net email is sponsored by: NEC IT Guy Games. Get your fingers limbered up and give it your best shot. 4 great events, 4 opportunities to win big! Highest score wins.NEC IT Guy Games. Play to win an NEC 61 plasma display. Visit http://www.necitguy.com/?r=20
|
|
| <Prev in Thread] | Current Thread | [Next in Thread> |
|---|---|---|
| Previous by Date: | Re: Jython 2.1 and Python 2.3.3, Prakash A |
|---|---|
| Next by Date: | zxJDBC, Patil, Babagouda |
| Previous by Thread: | Re: Jython 2.1 and Python 2.3.3, Prakash A |
| Next by Thread: | zxJDBC, Patil, Babagouda |
| Indexes: | [Date] [Thread] [Top] [All Lists] |
| News | FAQ | advertise |