# HG changeset patch # User paulb # Date 1080253181 0 # Node ID 54ea1aac563e69d9f3925cc66bcf78231bbf1642 # Parent 7575298253222540547de38998a6377406197ece [project @ 2004-03-25 22:19:41 by paulb] Added unsuccessful JavaServlet features. diff -r 757529825322 -r 54ea1aac563e README.txt --- a/README.txt Fri Jun 20 22:22:10 2008 +0200 +++ b/README.txt Thu Mar 25 22:19:41 2004 +0000 @@ -35,3 +35,32 @@ Field access needs testing, especially for anything using the cgi.FieldStorage class - Webware and Twisted certainly need reviewing. + +Java Servlet API Notes +---------------------- + +Trying to get WebStack working on top of the Java Servlet API was an +unsuccessful exercise. First, I tried to use jythonc at the top of a directory +structure consisting of WebStack, Simple and the SimpleApp.py source file, but +jythonc insisted on making a Java source file - WebStack.java - which +conflicts with the WebStack package. I would have expected it to make an +__init__.java file inside the WebStack directory containing the Java source +files. + +Then, I decided to make .jar files for each package before compiling +SimpleApp.py, but this did not work particularly well. Each main.py file +imports the appropriate package (WebStack.Adapters.JavaServlet for WebStack, +Simple for Simple). The CLASSPATH environment variable was set to include +servlet.jar from Apache Tomcat and, for SimpleApp.py, the previously produced +.jar files. + +[In the WebStack root directory...] +jythonc --all --jar .../WEB-INF/lib/WebStack.jar -J "-deprecation" main.py +[In the examples/Common directory...] +jythonc --all --jar .../WEB-INF/lib/Simple.jar -J "-deprecation" main.py +[In the examples/JavaServlet/SimpleApp directory...] +jythonc --all --workdir .../WEB-INF/classes -J "-deprecation" SimpleApp.py +cp .../jython.jar .../WEB-INF/lib + +Somehow, the Simple package doesn't contain SimpleResource, even if the +appropriate main.py file explicitly references it.