RE: [Zope] Using Java Applets in Zope
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.
On Friday 13 July 2001 11:04, you wrote:
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
I'll try with the file object. Now it's for use in a CMF Portal but I'll guess that the workaround would be the same. Just place the file object in a skin folder. I'll try it out and let u know if it doesn't work :-) For your info - we are using ProxyPass and VirtualHosts in apache Regards, -- Gitte Wange Jensen Sys Admin, Developer and a lot more MMmanager.org Aps, Denmark Phone: +45 29 72 79 72 Email: gitte@mmmanager.org Web: www.mmmanager.org Quote of the day: "Diskussioner ville ikke vare længe, hvis det kun var den ene part, der tog fejl."
participants (2)
-
Andy Gimblett -
Gitte Wange