I have a Django application that we are trying to deploy to a Tomcat server using django-jython.
To test everything, I created a WAR archive file for an empty Django application. Django's test application is called a chair.
Our Tomcat server does not seem to like WAR archive files, so I exploded (unzipped this) and copied these files to the server.
The web server administrator created the context and directory for me for this context (mediatracking).
I copied the files from the WAR archive to this directory, and I'm not quite sure how to get this test application to run now?
\mediatracking - application.py - application$py.class \WEB-INF web.xml \lib - jruby-extras-fileservlet.jar - jython.jar \lib-python - Lib.pth - README \chair \django \doj \Lib
etc .. (I did not go down lower than in the chair / django / doj / Lib directory.)
Is there anything obvious in this directory structure?
And how exactly can I get the Tomcat server to actually “run” this application? It does not start automatically if you go to the context directory (and there is only the application.py file and application $ py.class there, so I'm not sure how it will be).
Do I need to ask my web server administrator to do something with the web.xml file? I checked this, and there seems to be nothing there to help this application run:
<?xml version="1.0" encoding="utf-8"?> <!DOCTYPE web-app PUBLIC "-//Sun Microsystems, Inc.//DTD Web Application 2.3//EN" "http://java.sun.com/dtd/web-app_2_3.dtd"> <web-app> <display-name>chair</display-name> <description> chair through WSGI with modjy </description> <context-param> <param-name>files.prefix</param-name> <param-value></param-value> </context-param> <servlet> <servlet-name>modjy</servlet-name> <servlet-class>com.xhaus.modjy.ModjyJServlet</servlet-class> <init-param> <param-name>reload_on_mod</param-name> <param-value>1</param-value> </init-param> <load-on-startup>1</load-on-startup> </servlet> <servlet> <servlet-name>fileservlet</servlet-name> <servlet-class>org.jruby.webapp.FileServlet</servlet-class> </servlet> <servlet-mapping> <servlet-name>fileservlet</servlet-name> <url-pattern>/media/*</url-pattern> </servlet-mapping> <servlet-mapping> <servlet-name>modjy</servlet-name> <url-pattern>/*</url-pattern> </servlet-mapping> </web-app>
Any advice at all would be greatly appreciated =).
Cheers, Victor
django jython tomcat
victorhooi
source share