From: Alan K. <jyt...@xh...> - 2011-06-18 15:19:24
|
[dstarr] > I have a python script called SendGridEnvelope.py that gets packaged in my > WAR under WEB-INF/classes. > > I keep getting a file not found exception because the execfile function is > looking for the Python script under my Jboss/bin directory. I am using > Jython by the way. > > Does anyone know why the execfile method is looking for the python script in > the Jboss/bin dir and how to change this? You need to find the path of the *relative to the context root of the application*. You can see example java source that does that here https://fisheye3.atlassian.com/browse/jython/trunk/jython/src/com/xhaus/modjy/ModjyJServlet.java?hb=true#to192 Should be straightforward to translate to jython. Alan. |