Problem: import own Java classes in Jython

TheKnight basmaker at
Tue Jun 3 15:18:36 CEST 2003

Hi all,
I have a small problem.
I want to be able to call python scripts from my servlet.
Herefore I use Jython.
I would like to make a call from the script to a class from my own
from a.b.c import MyClass

I get the following error:

Traceback (innermost last):
  File "", line 11, in ?
ImportError: no module named a

MyClass should be in the classpath because that class is included in
the war file for deployment and the servlet runs.
jython.jar is in the /WEB-INF/lib directory of the same war file.

I can call and execute scripts from my servlet but the calls from the
script to some servlet classes fails.

Can anyone help me?
Thank alot

More information about the Python-list mailing list