Cliff-

I forgot to mention that your statically mapped files can be URLs as well.  So for testing purposes on your machine the appengine-web.xml that I gave you previously would work.  However, to deploy to the cloud you will need to use the URL to your .py files instead.  For instance:

<?xml version="1.0" encoding="UTF-8"?>
<appengine-web-app xmlns="http://appengine.google.com/ns/1.0">
    <application>MyJythonApp</application>
    <version>1</version>
    <static-files>
        <include path="http://localhost:8080/NewJythonServlet.py"/>
    </static-files>
    <sessions-enabled>true</sessions-enabled>
</appengine-web-app>

Of course, when you deploy the app then the URL should match that of your application.


Josh Juneau
juneau001@gmail.com
http://jj-blogger.blogspot.com
Twitter ID:  javajuneau


On Sat, Aug 1, 2009 at 10:28 AM, Josh Juneau <juneau001@gmail.com> wrote:
Hi Cliff-

The Google App Engine is a bit weird with the PyServlet as it does not want to handle the .py file as code, but rather as text like you had mentioned.  You should add your .py code to the appengine-web.xml file as "static files" and then set up the PyServlet in your web.xml as usual (mapped to url-pattern of *.py).

Suppose my Jython servlet name is NewJythonServlet.py and the path on my OS to the file is /Jython-code/servlets/NewJythonServlet.py, I will need to set up my appengine-web.xml as follows:

<?xml version="1.0" encoding="UTF-8"?>
<appengine-web-app xmlns="http://appengine.google.com/ns/1.0">
    <application>MyJythonApp</application>
    <version>1</version>
    <static-files>
        <include path="/Jython-code/servlets/NewJythonServlet.py"/>
    </static-files>
    <sessions-enabled>true</sessions-enabled>
</appengine-web-app>

Once this is completed, you can deploy to GAE and run as follows http://gae-server:8080/NewJythonServlet.py

Let me know if this works out for you.

Josh Juneau
juneau001@gmail.com
http://jj-blogger.blogspot.com
Twitter ID:  javajuneau


On Sat, Aug 1, 2009 at 7:11 AM, Cliff Hill <xlorep@darkhelm.org> wrote:
Is there anyone here who has successfully gotten Jython 2.5.0 to work with GAE? I was able to make modjy work with it, but I would rather not use modjy. I'm building a small site from scratch, and want to use PyServlet, but I am running into a snag -- after I set everything up, instead of processing my python code, the server is simply giving me my .py file to download.

I can get more specifics if needed.

--
"I'm not responcabel fer my computer's spleling errnors" - Xlorep DarkHelm
Website: http://darkhelm.org


------------------------------------------------------------------------------
Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day
trial. Simplify your report design, integration and deployment - and focus on
what you do best, core application coding. Discover what's new with
Crystal Reports now.  http://p.sf.net/sfu/bobj-july
_______________________________________________
Jython-users mailing list
Jython-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/jython-users