From: <bc...@wo...> - 2001-02-16 14:54:05
|
[brian] > Are you using the latest CVS version of jython? Finn has > fixed where the jars and clases under your WEB-INF were > not being found. Since the servlet container does not add > the WEB-INF/* subdirs to the CLASSPATH, jython originally > had no means of getting to those classes. But the patch > added support to have the jython classloader look in optional > directories for jar's and class'es. I have tested this under > JRun with great success and I believe others have used > Tomcat. [Jaroslav Gergic] >Thak you for the tip! I will optionally upgrade - The change that brian describe is in org.python.util.PyServlet. Since you can't possible be using this class (because it is completely new) you will not find any benefits by upgrading. Unless you also begin to use org.python.util.PyServlet. >but >I would prefer to use at least milestone release in my software, >I do not like CVS snapshots a lot. ;) > >Meantime I solved the problem with the Jython 2.0 relase: >Step 1: modify the property in the reistry file (my.lib): >---sample--- >python.packages.paths = my.lib, java.class.path, sun.boot.class.path >python.packages.directories = java.ext.dirs >---END--- That is exactly the trick used by org.python.util.PyServlet. http://cvs.sourceforge.net/cgi-bin/cvsweb.cgi/jython/org/python/util/PyServlet.java?rev=1.6&content-type=text/x-cvsweb-markup&cvsroot=jython >Step 2 run JVM with proper settings: >java -cp ... -Dpython.home=<path to reg. file> -Dmy.lib=<path to jar> > >It works and jython finds the classes in your custom JAR file. regards, finn |