Tuesday, March 10, 2009

Deploying Pylons Apps to Java Servlet Containers

As of the 0.9.7 release, Pylons now supports Jython 2.5. The new snakefight tool can create a WAR file from a Pylons app via its bdist_war distutils command.

Using bdist_war is simple: just follow these instructions on the Pylons official docs: Pylons on Jython.

The WAR file contains everything you'll need: the Jython runtime and all the eggs your app requires. For Paste style apps, it can automatically generate a deployment descriptor (web.xml) to load the application via modjy (which is now included with Jython as of the beta2 release).

This makes deployment to a J2EE App server incredibly easy, even easier than deploying your app behind Apache or the like.

I'll be giving a talk on Pylons on Jython at PyCon '09 in a couple weeks. 

2 comments:

Frank Wierzbicki said...

I have to say, I *love* the name snakefight :)

Wayne said...

Great work. Was pleasantly surprised when it worked the very first time without any problems at all.