views:

100

answers:

0

Hi,

I have a Django app we're attempting to deploy to a Tomcat server, using django-jython.

Just to test things, I've created the WAR archive file for a empty Django app successfully. The test Django application is called "chair".

Our Tomcat server apparently doesn't like WAR archives files, so I exploded (unzipped this), and copied these files to the server.

The webserver admin has created a context for me, and a directory for that context (mediatracking).

I've copied the files from the WAR archive into that directory, and I'm not quite sure how to get that test app 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 haven't descended lower than that in the chair/django/doj/Lib directory.)

Is there anything obvious missing from the above directory structure?

And how exactly do I get the Tomcat server to actually "run" this app? It doesn't run automatically if you go to the context directory (and there's only a application.py and application$py.class file there, so I'm not sure how it would).

Do I need to ask my webserver admin to do something with the web.xml file? I checked that, and there doesn't seem to be anything in there that would help this app run either:

<?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"&gt;
<web-app>
  <display-name>chair</display-name>
  <description>
   chair through WSGI with modjy
  </description>
  <context-param>
    <param-name>files.prefix</param-name> <!-- Needed by fileservlet -->
    <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