[Jslib] mozilla remote applications -- help needed

li zhang cis student lz3 at oak.njit.edu
Wed Dec 10 10:35:56 EST 2003


Hi,

I have a question about using mozilla certificate
for remote applications.


I'm doing a Web application using Java and Javascript.
The Web server I'm using now is apache tomcat 4.1.


My application generates html documents dynamically.
For example, I have static html files: main.html.
Based on the user action from the browser, my application
reads the static html file and outputs some text
to the static html file then display that on the
Mozilla web browser.

I want to use some XPConnect functions that
Mozilla browser supports, so I put a Javascript
function in the main.html file as following:

--------------------------------------------------------
function addXptr()
{
netscape.security.PrivilegeManager.enablePrivilege("UniversalXPConnect");
var xptrService =
Components.classes["@mozilla.org/xpointer-service;1"].getService();
xptrService =
xptrService.QueryInterface(Components.interfaces.nsIXPointerService);
var xptrString =
xptrService.createXPointerFromSelection(window._content.getSelection(),
window._content.document);
alert(xptrString)
}
---------------------------------------------------------

I imported a certificate to the Mozilla browser.
If I put main.html in a jar (li.jar!/main.html)
file, then I can use the  XPConnect function.

But the problem is, since my application reads
the main.html and then modifiy it and then
submit this html file to the web browser, the
file's content changes, so I don't know
how to access the modified html file.

Because if I sign the static html file with
a certificate, I only can access the static
html file, not the changed file.


So I wonder is there a way to sign
a remote application with dynamic html
documents? Can I call XPConnect within
a Java application?



Thank you very much.


Li Zhang



_______________________________________________
mozilla-xml mailing list
mozilla-xml at mozilla.org
http://mail.mozilla.org/listinfo/mozilla-xml
_______________________________________________
Jsconsole mailing list
Jsconsole at mozdev.org
http://mozdev.org/mailman/listinfo/jsconsole


More information about the Jslib mailing list