Win a copy of Testing JavaScript Applications this week in the HTML Pages with CSS and JavaScript forum!
  • 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 all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Bear Bibeault
  • Ron McLeod
  • Jeanne Boyarsky
  • Paul Clapham
Sheriffs:
  • Tim Cooke
  • Liutauras Vilda
  • Junilu Lacar
Saloon Keepers:
  • Tim Moores
  • Stephan van Hulst
  • Tim Holloway
  • fred rosenberger
  • salvin francis
Bartenders:
  • Piet Souris
  • Frits Walraven
  • Carey Brown

Calling an applet in a JSP page

 
Ranch Hand
Posts: 69
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,

I'm trying to embed an applet in a JSP page. I written like this.



My applet is in the package called 'Applets'. my jsp page and java classes are build in a way of normal webapplication structure.

When i try to execute the jsp page, it is giving error like below..



From the above error, my application path is http://localhost:9090/TranslationTool/

I also tried to add codebase='.'. But no use.

Please help me in this.
 
Rancher
Posts: 43016
76
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Is "http://localhost:9090/TranslationTool/Applets/FileApplet.class " the correct path? In other words, can you download the class file if you paste that URL into the browser?

My applet is in the package called 'Applets'.


The "code" attribute must contain the fully-qualified class name, including the package. Remove the "codebase" attribute.
 
udaykumar maddigatla
Ranch Hand
Posts: 69
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
HI

I removed codebase attribute and added fully Qualified class name in the code attribute. But problem remains the same.

My Class file is in this location 'TranslationTool/WEB-INF/classes/Applets/FileApplet.class'

Help me in this.
 
Ulf Dittmer
Rancher
Posts: 43016
76
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator

My Class file is in this location 'TranslationTool/WEB-INF/classes/Applets/FileApplet.class'


Nothing that's inside of WEB-INF can be served to the public. The class needs to be where the error message says it's looking for it.
 
Where does a nanny get ground to air missles? Protect this tiny ad:
Building a Better World in your Backyard by Paul Wheaton and Shawn Klassen-Koop
https://coderanch.com/wiki/718759/books/Building-World-Backyard-Paul-Wheaton
    Bookmark Topic Watch Topic
  • New Topic