[Zope] Using Java Applets in Zope

Andy Gimblett andy.gimblett@ftech.net
Fri, 13 Jul 2001 10:04:38 +0100


> > This has nothing to do with zope or apache in fact. Java applets are
> > served like any other static file. So, if the applet tag 
> > reference the jar file in the current directory, put the jar file
> > in the same directory as the html file. As simple as this ;-)
> 
> I am aware of that - but I don't have a HTML file ... I mean. 
> The "html" page that uses the applet is served by Zope - and therefor
> I cannot just place the applet in the same dir as the html file.

You should be able to. OK, it's not a directory on disk - it's a
directory in the ZODB. But you should be able to simply create a "File"
object in the right place in the ZODB and upload your .jar into
that file.

An alternative approach would depend on the way you're using Apache.
If you have a virtual host for your Zope site, and let's say you're
using FastCGI to communicate between Apache and Zope, then you should
be able to tell Apache _not_ to do so for URLs containing, for
example "/applets/", and to instead serve them direct from some directory
in your filesystem (as you would with standalone Apache). Then you'd just
put your .jar(s) in that directory. This is a common strategy for, eg,
serving images. Let me know if you want to know more detail. :-)

But this is perhaps overcomplicated, simply uploading the .jar into
a "File" object in the ZODB should work.

-Andy

-- 
Andy Gimblett - Programmer - Frontier Internet Services Limited
Tel: 029 20 820 044 Fax: 029 20 820 035 http://www.frontier.net.uk/
Statements made are at all times subject to Frontier's Terms and
Conditions of Business, which are available upon request.