• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

WebPage can't run applet as signed after another signed applet is disabled

 
Greenhorn
Posts: 10
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hello,

My web page runs a signed applet when loaded. After a user clicks a button on that page it makes the applet control Visible='false' and makes another signed applet Visible='true'.

When the first applet initially loads with the web page I am asked for permission to run signed applet but when the second one is loaded I don't see such security dialog box and I think that's why it don't work properly (it starts as a simple applet and not signed one).

Is there any way to force that security dialog box on the second applet or to completely unload the first one (with JVM together?)? Maybe JVM is to slow to unload the first signed applet?
Everything is ok if I comment out the code for the first applet and make the second applet be one that first loads on my webpage.

Thanks.
 
Ranch Hand
Posts: 77
5
  • Likes 1
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Applet visibility is separate from applet loading. Both applets are loaded as soon as the page is loaded, and that is when the JRE will prompt for permissions.
 
Se Koan
Greenhorn
Posts: 10
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Thank you!!

I am writing the webpage using asp.net. Do you think the second applet will work if I remove the second applet's html code from the .aspx page and load this code for the second applet from codebehind (that is create this html control on aspx page). Do I need to (somehow) remove the code for the first applet element from the aspx page?
 
Andrew Thompson
Ranch Hand
Posts: 77
5
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
It sounds to me as though the page is working at the moment, just, not the way you'd like. As far as that goes, it is 'tough biccies', since any hack that you come up with to make it work the way you expect is likely to break with the next version of Java or the browser.

The solution? Redesign your app.
 
Ranch Hand
Posts: 495
Chrome Java Linux
  • Likes 1
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
A possible solution would be to make it into one huge app. If you put it into one program, you would solve your problems.

John Price
 
Saloon Keeper
Posts: 7585
176
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

john price wrote:A possible solution would be to make it into one huge app.


Indeed. Using a CardLayout would be a good approach for this.
 
Se Koan
Greenhorn
Posts: 10
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Thanks, good suggestions but there's a problem. Initially I made one applet. At first it loasds with page and after the user allows the applet to tun as signed the applet performs some actions and writes data to temp file. Then athe user presses a button on the webpage and it changes the css class of the applet to move it to other position and resizes it, additionally it passes a parameter to the applet to say that it now needs to read temp file and display the data. Changing the css class of this applet makes it reload but when it reloads it acts not as a signed applet, seems like it can't read the file and thus can't display the data and that means possibly I must force the signed applet security dialog box to show up again or keep the applet from reloading but how to change it's position/size on the aspx page then...?
 
Tim Moores
Saloon Keeper
Posts: 7585
176
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I can't say I fully understand what you're trying to do, but it sounds like having just a single applet would take care of most of the issues you describe.
 
Se Koan
Greenhorn
Posts: 10
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

Tim Moores wrote:I can't say I fully understand what you're trying to do, but it sounds like having just a single applet would take care of most of the issues you describe.



Basically, this: I don't think I can use one signle applet because I need the applet to be reloacated on the webpage to display the data. For that I change the css class of the applet and when the applet is moved to other position on the page it reloads but after this it can't work as signed applet.
 
Tim Moores
Saloon Keeper
Posts: 7585
176
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Maybe you can redesign the page so that the applet does not need to move. That would be a confusing (to the user) thing to do anyway.
 
Consider Paul's rocket mass heater.
reply
    Bookmark Topic Watch Topic
  • New Topic