• 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

Cannot load applet

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

I am developing an application, using JSF, in which I have used applet to upload the directory. But I am not able to load that applet in the browser.

My code is


It gives me error on the Browser's Java Console



I have created a jar file, sign it and put it in to the lib of my application.
I have also tried to change the codebase to my lib folder

Thanks in advance.
 
Ranch Hand
Posts: 2908
1
Spring Java Ubuntu
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Use 'archive' attribute for loading the jar file.
 
rajshkhr pandey
Ranch Hand
Posts: 35
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

Sagar Rohankar wrote:Use 'archive' attribute for loading the jar file.



Yes, I have tried with "archive" attribute of applet but it gives me same error.
I think there is problem with codebase. How can I set the codebase to my jar file.

Thanks.
 
Sagar Rohankar
Ranch Hand
Posts: 2908
1
Spring Java Ubuntu
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Well, firstly I would suggest you to try using simple "applet" html tag and go through the basic applet configuration, also ponder on this basic cause:

Do you have that class available there, also google for the basic Java Applet example.
 
rajshkhr pandey
Ranch Hand
Posts: 35
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hello Sagar,

I have tried the same applet code on the simple HTML page, it worked perfectly. I think because path to archive file is correct.
But when I insert the same code with JSF component, it gives the error.

I have placed the jar file in the lib folder and used archive as an attribute in the plugin tag to the jar file of applet code. Gives same error.
Also tried to put class file in to the classes folder to load applet, again gives same error.

thanks for reply.
 
Sagar Rohankar
Ranch Hand
Posts: 2908
1
Spring Java Ubuntu
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

rajshkhr pandey wrote:Hello Sagar,

I have tried the same applet code on the simple HTML page, it worked perfectly.


OK, fine, then copy that same folder having the HTML file into your web app root folder, like.

and access the html file as,
http://localhost:8080/MY_APP/YOUR_HTML_DIR/yourhtml.html

If this works then, you can have an idea what you need to setup for JSP/JSF file
 
With a little knowledge, a cast iron skillet is non-stick and lasts a lifetime.
reply
    Bookmark Topic Watch Topic
  • New Topic