>From what I know, the current version appears to incorrectly interpret the
argument (correct me if I am wrong.) It tests to see if the current context
is an applet and assumes a filename otherwise. However, I may want to use a
url but *not* within the context of an applet, thus (batch
"http://host/resource") fails for non-applets because FileReader does not
understand "http://".

//
// snippet from Batch class in Funcall.java
//
        if (context.getEngine().getApplet() == null)
        fis = new FileReader(filename);

I started to write an alternate version (batch-url "xxx") that would parse
the argument as if it were a URL for known protocol prefixes like "http"
"ftp" and "file" and hopefully do the right thing with each. I am still not
clear on what needs to be done in the context of an applet. I think I need
to check for the document base when given a relative url e.g. (batch
"./resource").

If anyone has suggestions or wants a copy, please reply off-list and I will
send you what I have.

alan

> -----Original Message-----
> From: Liu, F. (Fang) [mailto:[EMAIL PROTECTED]]
> Sent: Wednesday, January 12, 2000 7:42 AM
> To: Fran / Carmen
> Cc: Jess list
> Subject: Re: JESS: Problem with batch function
> 
> 
> Hi, Fran:
> Is your file on the local machine or a remote server? Applet can't
> read/write file on a remote machine unless you sign your applet.
> Read the email the Ernest sent to us before maybe helpful.
> 
> 
> Subject: 
>                  Re: JESS: applet and security
>       Date: 
>                  Fri, 6 Aug 1999 06:45:55 -0700 (PDT)
>     From: 
>                  "Ernest Friedman-Hill" 
> <[EMAIL PROTECTED]>
>           To: 
>                  <[EMAIL PROTECTED]>
>         CC: 
>                  <[EMAIL PROTECTED]>
> 
> 
> 
> 
> Hi,
> 
> None of Jess's defclass/definstance/new/call/get-member functions will
> work in unsigned applets. As the exception says, Netscape considers
> the Java Reflection API Jess is using to be a security problem.
> 
> I will say this one more time:
> 
>    *** Don't use Applets. ***
>    *** Applets are only good for dancing elf animations. ***
>    *** Use Jess on the server side, perhaps in a servlet. ***
> 
> It is exceedingly likely that Jess 5.0 final will come with a servlet
> example but -without- an applet example.
> 
> If you absolutely must use Jess in an applet, you're going to need to
> use digital signatures. Here's a web page with a lot of good info
> about this process:
> 
>       http://www.suitable.com/Doc_CodeSigning.shtml
> 
> 
> I think Fang Liu wrote:
> > 
> > Hi, jess-users:
> > 
> > I am having a problem with applet and security. What I want 
> to do is to
> > create an object inside an applet and I can later on use 
> the object as a
> > fact or template to fire some rules.  However, I can not do 
> it. I got
> > stuck with "defclass" (see the following code). What did I 
> do wrong? I
> > need some help here. Any comments are appreciated.
> > 
> > By the way, I already added all the userpackages for the 
> rete engine to
> > avoid any "function not implemented" error .
> >       
> >       ...
> >       rete.executeCommand("(store Mytank (new 
> jess.examples.pumps.Tank
> > \"MMM\"))");
> >       rete.executeCommand("(printout t (fetch Mytank) crlf crlf)");
> >       rete.executeCommand("(defclass mytank
> > jess.examples.pumps.Tank)");                                
>                                                                   
> > rete.executeCommand("(definstance mytank (fetch Mytank))");
> >         ...
> > 
> >         The following is the error message in Netscape 4.51 java
> > console:
> > 
> > 
> >        Tank MMM level now 495
> >        <External-Address:jess.examples.pumps.Tank>
> >       
> >        netscape.security.AppletSecurityException: 
> security.member access at
> > 
> netscape.security.AppletSecurity.checkMemberAccess(AppletSecur
> ity.java:1155) 
> > at
> > 
> netscape.security.AppletSecurity.checkMemberAccess(AppletSecur
> ity.java:1143)
> >    at java.lang.Class.checkMemberAccess(Class.java:698)
> >    at java.lang.Class.getDeclaredMethods(Class.java:555)
> >    at 
> java.beans.Introspector.getTargetEventInfo(Introspector.java:444)
> >    at java.beans.Introspector.getBeanInfo(Introspector.java:200)
> >    at java.beans.Introspector.getBeanInfo(Introspector.java:83)
> >    at java.beans.Introspector.<init>(Introspector.java:178)
> >    at java.beans.Introspector.getBeanInfo(Introspector.java:83)
> >    at jess.reflect.Defclass.call(ReflectFunctions.java:869)
> >    at jess.Funcall.simpleExecute(Funcall.java:336)
> >    at jess.Funcall.execute(Funcall.java:297)
> >    at jess.Funcall.execute(Funcall.java:196)
> >    at jess.Jesp.parseAndExecuteFuncall(Jesp.java:1386)
> >    at jess.Jesp.parseSexp(Jesp.java:161)
> >    at jess.Jesp.parse(Jesp.java:61)
> >    at jess.Rete.executeCommand(Rete.java:1091) 
> >       ....
> >  Thanks.
> > 
> >  Fang Liu
> 
> Regards,
> Fang Liu
> 
> Fran / Carmen wrote:
> > 
> > Problem with batch function
> > I'm calling JESS functions from Java applet using fetch and 
> store, the
> > program works without problem using the JDK but when I try 
> to open the
> > HTML page from  Explorer appear this error:
> > 
> > exception: com.ms.security.SecurityExeptionEx[jess/Batch.call]:
> > cannot access file name.clp
> > 
> > it's not a path problem (I'm using Internet Explorer ver 5).
> > 
> > Thaks
> > Fran
> ---------------------------------------------------------------------
> To unsubscribe, send the words 'unsubscribe jess-users 
> [EMAIL PROTECTED]'
> in the BODY of a message to [EMAIL PROTECTED], NOT to the
> list (use your own address!) List problems? Notify 
> [EMAIL PROTECTED]
> ---------------------------------------------------------------------
> 
---------------------------------------------------------------------
To unsubscribe, send the words 'unsubscribe jess-users [EMAIL PROTECTED]'
in the BODY of a message to [EMAIL PROTECTED], NOT to the
list (use your own address!) List problems? Notify [EMAIL PROTECTED]
---------------------------------------------------------------------

Reply via email to