How to create a war file from a jython WSGI web application
سؤال
I would like to deploy a WSGI (keystone) web application, running with jython 2.5.2, as a war file to a java servlet application server (specifically glassfish).
How can I create a war file from my keystone web application (or any WSGI app)?
المحلول
After some more searching I found this.
http://opensource.xhaus.com/projects/modjy/wiki/ModjyWarPackaging
That showed how to create a war file from any WSGI app (which keystone is).
نصائح أخرى
Creating an empty django project, creating a war file from it and inspecting the war file contents like so also helps.
- Install jython
- Install setuptools
- jython (jython install dir)/bin/easy_install django # currently version 1.4.1
- jython (jython install dir)/bin/easy_install django_jython
- jython (jython install dir)/bin/django_admin.py startproject emptyProj
- cd emptyProj
- Edit emptyProj/emptyProj/settings.py and put ADMIN_MEDIA_PREFIX=STATIC_URL at the end of the file and add 'doj', to the INSTALLED_APPS tuple.
- jython manage.py startapp emptyApp
- jython manage.py war
- mkdir tmp
- mv emptyProj.war tmp
- cd tmp
- unzip emptyProj.war
- Manually inspect the war file structure
لا تنتمي إلى StackOverflow