Hi Joaquim,
I got your applet to work fine and added the interceptor by reflection (I 
had just forgotten to register the interceptor).

By the way, I just had to modify the first policy that I posted as followed:
...
permission java.io.FilePermission "C:\\Program Files\\OpenOffice.org 
2.0\\program\\*", "read, execute";
...
Indeed the applet needs permission to run some of the programs in the 
program folder.  I got it to work with a self-signed certificate and the 
policy for the applet runtine settings of the Java-PlugIn.

"Joachim Lingner" <[EMAIL PROTECTED]> wrote in message 
news:[EMAIL PROTECTED]
> ramboid wrote:
>> Joachim Lingner <joachim.lingner <at> sun.com> writes:
>>
>>> ramboid wrote:
>>>> Joachim Lingner <joachim.lingner <at> sun.com> writes:
>>>>
>>>>> Clovis Wichoski wrote:
>>>>>
>>>>> Joachim
>>>>>> TIA
>>>>>>
>>>>>> Clóvis
>>>>>>
>>>> This class also worked very well for me and it appears to provide the
>> solution
>>>> that we were looking for.  How would you suggest that we apply the
>> policies,
>>>> that you uploaded to this project, without having to set the applet
>> runttime
>>>> settings of every PC that will run the applet?
>>>>
>>> There is probably no other way to set the policy manually in the control 
>>> panel. This cannot be done programmatically, because this would allow 
>>> all applets to set access rights as they like.
>>> Maybe a signed applet is the solution. For more information look here:
>>>
>> http://java.sun.com/j2se/1.5.0/docs/guide/plugin/developer_guide/rsa_signing.ht
>> ml
>>> Joachim
>>>> ---------------------------------------------------------------------
>>>> To unsubscribe, e-mail: dev-unsubscribe <at> openoffice.org
>>>> For additional commands, e-mail: dev-help <at> openoffice.org
>>>>
>> Thank you Joaquim,
>> How would you suggest that I implement an Interceptor for the OOoViewer? 
>> I am running the applet by adding the three classes to a signed jar: two 
>> from the OOoVier and one for the interceptor.  I can invoke the 
>> interceptor by reflection and add the OOoViewer XFrame to the Inerceptor. 
>> However, the Interceptor seems to fail in intercepting events.  When the 
>> applet starts, I see that the icon for the Save button is dimmed (I am 
>> intercepting every event).  I type a few words in the Writer and several 
>> properties are outputted in the Java console.  Afterwards the Save button 
>> is active again and the Save event saves files in the hard disk.
>>
>> I am thinking that I should write my own OOBean with an interceptor 
>> included.  Perhaps I can extend the OOBean and attached the extended 
>> OOBean to an interceptor.  The OOoViewer would work with the custom 
>> OOoBean.
>>
> Thankfully Jürgen has already replied :)
>
>> By the way, I certified the applet and the OOoViewer is working  fine.  I 
>> also altered the policy file that you uploaded to the Attic as follows:
> Great. I will use this in the test. What is not clear to me is if your 
> applet has worked without setting the policies, which I would have 
> assumed.
>
> Joachim
>>
>> grant {
>>   permission java.lang.RuntimePermission "loadLibrary.*";
>>   permission java.io.FilePermission "C:\\Program Files\\OpenOffice.org 
>> 2.0
>> \\program\\*", "read";
>>   permission java.io.FilePermission "C:\\Program Files\\OpenOffice.org 
>> 2.0
>> \\program\\classes\\*", "read";
>>   permission java.util.PropertyPermission "*", "read";
>> };
>>
>> The applet works fine with the less permissive policy.
>>
>>
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: [EMAIL PROTECTED]
>> For additional commands, e-mail: [EMAIL PROTECTED]
>> 



---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to