• 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

Applet with Tomcat

 
Greenhorn
Posts: 15
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi, i've done an applet and i've insert the applet html tag in a servlet class.
When i try my applet in a browser it works as well,
but when i try it under tomcat it doesn't work: "load applet-name not found".
Another thing i've noted is that java compiler of jdk_sdk1.3 compile the applets even creating a .java~ file and the browser run it correctly.
When i try to compile it with the jdk_sdk1.4 the compiler produce only a .class file but the browser don't load it.
Why?
Thanks,Gabri
 
Author and all-around good cowpoke
Posts: 13078
6
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Probably the problem is related to how the browser locates the applet class files. The browser has to make a separate request to the server, if there is no absolute path to the classes provide, the browser tries to make one based on the way it addressed the servlet which never works.
You get the same problem with image files if the src reference is relative.
The solution I like is to provide a <BASE tag in the html page to tell the browser how to request the applet class files and other resources.
Bill
 
machines help you to do more, but experience less. Experience this tiny ad:
a bit of art, as a gift, the permaculture playing cards
https://gardener-gift.com
reply
    Bookmark Topic Watch Topic
  • New Topic