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
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]

20090806 Thursday August 06, 2009

Python CGIs in Sun Web Server 7.0

Python CGIs in Sun Java System Web Server 7.0

Add this test script in <ws7-install-dir>https-<instance-name>/docs/cgi-bin directory and call it hello.cgi

#!/usr/bin/env python
print("Content-Type: text/plain;charset=utf-8")
print("\r\n")
print("Hello World!")

Change obj.conf default object 

<Object name="default">
AuthTrans fn="match-browser" browser="*MSIE*" ssl-unclean-shutdown="true"
NameTrans fn="ntrans-j2ee" name="j2ee"
NameTrans fn="pfx2dir" from="/cgi-bin" dir="/<ws-install-dir>/https-<instance-name>/docs/cgi-bin" name="cgi"
...
<Object name="cgi">
ObjectType fn="force-type" type="magnus-internal/cgi"
Service fn="send-cgi"
</Object>

Send a request through the browser http://host:post/cgi-bin/hello.cgi

You can see Hello World! displayed.

References

http://docs.python.org/3.1/howto/webservers.html

Posted by meena ( Aug 06 2009, 01:12:22 PM IST ) Permalink Comments [0]

20090226 Thursday February 26, 2009

JavaMail Sample Application in Sun Java System Web Server 7.0 update 4

JavaMail Sample Application in Sun Java System Web Server 7.0 

I just tried out JavaMail sample application bundled with Sun Java System Web Server 7.0 and I thought it may be useful for others as well.

READ MORE >>

[Read More] Posted by meena ( Feb 26 2009, 12:56:15 PM IST ) Permalink Comments [0]

20081024 Friday October 24, 2008

Understanding Sun Java System Web Server 7.0 - for developers

Here are things a developer working on Web Server 7.0 or writing a NSAPI plugin should know  

I have tried to blog about basic things a NSAPI developer should know.

READ MORE >>>

[Read More] Posted by meena ( Oct 24 2008, 02:30:19 PM IST ) Permalink Comments [0]

This blog copyright 2009 by meena

Calendar

Search

RSS Feeds

Navigation

Referers