Meena Vyas

All | DTrace Web Server 7.0 | ACLs Web Server 7.0 | General Web Server 7.0 | HttpCompression Web Server 7.0 | Intrusion Detection Web Server 7.0 | Open Web Server | Reference Deployments of Web Server 7.0 | Reverse Proxy Web Server 7.0 | Security Web Server 7.0 | Troubleshooting Web Server 7.0 | WebDAV Web Server 7.0
« Python CGIs in Sun... | Main | Building Open Web... »
20090807 Friday August 07, 2009

Jython Web Application on Sun Web Server 7.0

Jython Web Application on Sun Java System 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-INF
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_webap

you should see a page starting with the contents:




Posted by meena ( Aug 07 2009, 01:30:37 PM IST ) Permalink Comments [0]

Trackback URL: http://blogs.sun.com/meena/entry/running_jython_web_application_on
Comments:

Post a Comment:

Name:
E-Mail:
URL:

Your Comment:

HTML Syntax: NOT allowed

This blog copyright 2009 by meena

Calendar

Search

RSS Feeds

Navigation

Referers