Friday August 07, 2009 Jython Web Application on Sun Web Server 7.0
Download Jython from http://softlayer.dl.sourceforge.net/project/jython/jython/2.5.0/jython_installer-2.5.0.jar
Run Jython installer and install it in lets say in /opt/jython/jython2.5.0
$java -jar jython_installer-2.5.0.jar
Lets try deploying a simple demo web application that comes along with this. This demo application has a simple demo_app.py script.
cd /opt/jython/jython2.5.0/Demo/modjy_webapp/WEB-INFPosted by meena ( Aug 07 2009, 01:30:37 PM IST ) Permalink Comments [0]
cp /opt/jython/jython2.5.0/jython.jar lib/
In web.xml change python.home i.e.
<init-param>
<param-name>python.home</param-name>
<param-value>C:/jython2.5</param-value>
</init-param>
to
<init-param>
<param-name>python.home</param-name>
<param-value>/opt/jython/jython2.5.0</param-value>
</init-param>
cd /ws7-install-dir/https-instance-name/config
Add in server.xml in virtual server element, the location of this web application<web-app> <uri>/modjy_webapp</uri> <path>/opt/jython/jython2.5.0/modjy_webapp</path> </web-app>Start the web server instance, and access the web application via browser using URI http://host:port/modjy_webapyou should see a page starting with the contents:
This blog copyright 2009 by meena