|
From: Davide M. <da...@ds...> - 2001-08-28 15:02:42
|
Hi, I want call a jython script within a servlet.
But I want that the classes used in the python
script are accessible throught a classloader other
than the system classloader.
I construct the classloader appropriately, then
I make
PySystemState jpState = new PySystemState();
jpState.setClassLoader(_urlcl);
jpState.initialize();
then i whould like that the classes are accessible with:
PySystemState.add_classdir(_path);
where _path contains the dir where the classloader point to.
Then
PythonInterpreter interp = new PythonInterpreter(null, jpState);
But during the execution, an exception fires. It say
that the module can't be found.
Is the way right? Note that the python classes are loaded
with the system class loader.
Any suggestion. Very thanks. Jython is very good.
Bye.
Davide.
|