Leo's Technical Blog

Deploying Django/Jython Projects on a J2EE App Server

Introduction

user

Leo Soto


jython, django, java

Deploying Django/Jython Projects on a J2EE App Server

Posted by Leo Soto on .
Featured

jython, django, java

Deploying Django/Jython Projects on a J2EE App Server

Posted by Leo Soto on .

Now that Django runs on Jython out of the box, you may wonder: "How do I deploy the resulting project into an application server (Tomcat, GlassFish, JBoss, etc)"?

The answer:

  
~/myproject$ jython25 manage.py war \
             --include-java-libs="/path/to/my/jdbc-driver.jar"

Providing that you have the latest svn revision on django-jython, and you have included 'doj' into your project INSTALLED_APPS, it will just work.

Then you drop the WAR file (generated in the parent directory of your project) into your application server, and that's all. No need to install Django or Jython in the target server. The WAR is completely self-contained.

If you are interested on Django/Jython, give this a try! And for more information, see the WarDeployment page on the django-jython wiki.