1.1 --- a/README.txt Fri Jun 20 22:22:10 2008 +0200
1.2 +++ b/README.txt Thu Mar 25 22:19:41 2004 +0000
1.3 @@ -35,3 +35,32 @@
1.4
1.5 Field access needs testing, especially for anything using the cgi.FieldStorage
1.6 class - Webware and Twisted certainly need reviewing.
1.7 +
1.8 +Java Servlet API Notes
1.9 +----------------------
1.10 +
1.11 +Trying to get WebStack working on top of the Java Servlet API was an
1.12 +unsuccessful exercise. First, I tried to use jythonc at the top of a directory
1.13 +structure consisting of WebStack, Simple and the SimpleApp.py source file, but
1.14 +jythonc insisted on making a Java source file - WebStack.java - which
1.15 +conflicts with the WebStack package. I would have expected it to make an
1.16 +__init__.java file inside the WebStack directory containing the Java source
1.17 +files.
1.18 +
1.19 +Then, I decided to make .jar files for each package before compiling
1.20 +SimpleApp.py, but this did not work particularly well. Each main.py file
1.21 +imports the appropriate package (WebStack.Adapters.JavaServlet for WebStack,
1.22 +Simple for Simple). The CLASSPATH environment variable was set to include
1.23 +servlet.jar from Apache Tomcat and, for SimpleApp.py, the previously produced
1.24 +.jar files.
1.25 +
1.26 +[In the WebStack root directory...]
1.27 +jythonc --all --jar .../WEB-INF/lib/WebStack.jar -J "-deprecation" main.py
1.28 +[In the examples/Common directory...]
1.29 +jythonc --all --jar .../WEB-INF/lib/Simple.jar -J "-deprecation" main.py
1.30 +[In the examples/JavaServlet/SimpleApp directory...]
1.31 +jythonc --all --workdir .../WEB-INF/classes -J "-deprecation" SimpleApp.py
1.32 +cp .../jython.jar .../WEB-INF/lib
1.33 +
1.34 +Somehow, the Simple package doesn't contain SimpleResource, even if the
1.35 +appropriate main.py file explicitly references it.