Project

General

Profile

ModjyWarPackaging » History » Revision 2

Revision 1 (Alan Kennedy, 2009-03-22 08:47 PM) → Revision 2/4 (Alan Kennedy, 2009-03-22 08:48 PM)

h1. Modjy WAR packaging 

 h2. Why WAR deployment. 

 When you deploy WSGI web applications in a java servlet container, such as "Apache Tomcat":http://tomcat.apache.org or "Glassfish":https://glassfish.dev.java.net/ , there are two different ways you can deploy 

  # You deploy your application using a particular directory structure.  
  # You can deploy your application as a single file. This file is a "WAR file":http://en.wikipedia.org/wiki/WAR_file , and actually is an archive of the same directory structure described above. 

 So, if your application is working correctly when deployed as a directory structure, then building a WAR file is a very simple extra step. 

 h2. How to build a WAR file. 

 First, build the directory structure of your application. If you're not certain how to build this structure, a simple way forward is to take the demo *modjy_webapp* directory from the jython distribution, and tweak that structure to meet your needs. 

 When you're happy with the contents of the directory hierarchy, execute a command like this, in the top level of your directory hierarchy, e.g. the *modjy_webapp* directory. 

 <pre> 
 $JAVA_HOME/bin/jar cvf WARNAME.war . 
 </pre> 

 Where WARNAME is the name of the WAR file you want to create, and $JAVA_HOME refers to the location where your JDK or JRE is installed. 

 h2. Django WAR packaging. 

 There is a dedicated page for [[ModjyAndDjango|django and modjy]]. 

 h2. Pylons WAR packaging. 

 There is a dedicated page for [[ModjyAndPylons|django [[ModjyAndDylons|django and pylons]].