Win a copy of TDD for a Shopping Website LiveProject this week in the Testing 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 Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Paul Clapham
  • Ron McLeod
  • Jeanne Boyarsky
  • Tim Cooke
Sheriffs:
  • Liutauras Vilda
  • paul wheaton
  • Henry Wong
Saloon Keepers:
  • Tim Moores
  • Tim Holloway
  • Stephan van Hulst
  • Carey Brown
  • Frits Walraven
Bartenders:
  • Piet Souris
  • Himai Minh

Tomcat does not load applet

 
Ranch Hand
Posts: 99
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hello!
I'm facing a problem here that I havent been able to solve for six days.
A month ago I had Windows 2000 running on my machine.
I installed and configured (context.xml, server.xml, web.xml) Tomcat 5.5.9, inserted an applet into a page that I put into the ROOT directory of
the Tomcat installation.
When I typed http://localhost in my browser the page loaded and so did the
the applet. And so it worked when I typed http://my_host_name from a remote
machine.
Then I installed XP Pro.
Did just the same. Everything worked locally.
But when I wanted to load the page from a remote machine the page loaded
but the applet didnt with the commonly known message "class not found".
I'm aware that there is a service running on XP that might conflict with
Tomcat. I stopped it but it didnt help.
I even tried codebase = "http://my_host_name" code = "myapplet.class".

What do you think it might be? I need a solution badly.


[fixed header]
[ January 24, 2006: Message edited by: Ben Souther ]
 
Sheriff
Posts: 13411
Firefox Browser VI Editor Redhat
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
fedai,

Typing in all caps is the equivalent to shouting in a web forum and is considered rude.


- The Bartender.
[ January 24, 2006: Message edited by: Ben Souther ]
 
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

I even tried codebase = "http://my_host_name" code = "myapplet.class".


I would first try
codebase = "http://my_host_name/"
If that didn't work I would try using the <BASE HTML tag.
How is the page that contains the applet tag being generated? Is it a static page?
Bill
 
fedai gandjaliyev
Ranch Hand
Posts: 99
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
What you offered didnt help.
What concerns the page it is a static.
I'm not administrator of our intranet so I cant delete or install
programs whenever I want.
On the applet's machine the JRE1.5 is running but on others is JRE1.4.2
Can the reason be this difference?
 
fedai gandjaliyev
Ranch Hand
Posts: 99
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I havent ever used the "base" html tag.
Could you show me the usage?
 
Sheriff
Posts: 67634
173
Mac Mac OS X IntelliJ IDE jQuery TypeScript Java iOS
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

Originally posted by fedai gandjaliyev:
I havent ever used the "base" html tag.
Could you show me the usage?



The HTML 4 Specification can be found here.
 
fedai gandjaliyev
Ranch Hand
Posts: 99
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
What about the JRE versions?
 
Ben Souther
Sheriff
Posts: 13411
Firefox Browser VI Editor Redhat
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

Originally posted by fedai gandjaliyev:
What about the JRE versions?



Applets are a client side technology.
The JRE version on the server has nothing to do with whether they work or not.
As far as Tomcat is concerned, your applet files are just static files to be served to the browser; no different than zip files or images.

I'm going to move this thread to the Applets forum for you.
 
fedai gandjaliyev
Ranch Hand
Posts: 99
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Is there smth to be configured in the jre5th plug-in to properly load
applets?
 
fedai gandjaliyev
Ranch Hand
Posts: 99
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
The problem isnt an ordinary one.
The fact is with 2000 I used just this code = "smpApp.class"
and everything was fine. I browsed the applet's page from
a remote host and it downloaded. After I reinstalled my OS(with XP) it worked locally but not remotely.
I mean I have the Tomcat running on an XP. I use the same code=.....
I browse http:\\localhost, the page is loaded and so does the applet.
But when browsing http:\\myhostname form a remote machine the status
bar of the page says that the applet class not found.

Please, help!
Thank you!
 
Rancher
Posts: 43027
76
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I don't think you should use an actual URL -including protocol and host name- for the codebase. Try using just the directory name, as is explained here.
 
fedai gandjaliyev
Ranch Hand
Posts: 99
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
DOES NOT HELP.
I have scratched my head until it's raw.
 
author and iconoclast
Posts: 24204
44
Mac OS X Eclipse IDE Chrome
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Have you tried typing "http://my_host_name/myapplet.class" into the URL bar of a browser on the remote machine? What happens? The precise error message you get could be very useful. Make sure the remote machine's browser is returning the true error page -- using FireFox or another real browser -- or even the appletviewer from the JDK -- would help here; anything is better than using Internet Explorer, which tries hard to hide the real error messages from you.

When you see the real error page when requesting the class file, look at it very carefully, and make sure it's coming from the Tomcat host, and not, for example, from some proxy or firewall in between.
 
Slideshow boring ... losing consciousness ... just gonna take a quick nap on this tiny ad ...
free, earth-friendly heat - a kickstarter for putting coin in your pocket while saving the earth
https://coderanch.com/t/751654/free-earth-friendly-heat-kickstarter
reply
    Bookmark Topic Watch Topic
  • New Topic