Win a copy of Think Java: How to Think Like a Computer Scientist this week in the Java in General forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Problem loading applets in servlet

 
sekar bala
Greenhorn
Posts: 27
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi all


I wrote an applet and i want to load it in servlet.But it is not happening can anybody help me.I pasted the source code below.

Applet Code


Servlet Code:

Reply fast..
 
Malatesh Karabisti
Ranch Hand
Posts: 153
Java Oracle
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
what exactly the error you seeing ?
 
sekar bala
Greenhorn
Posts: 27
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
No Error..Applet is not loading..what could be the problem
 
Paul Sturrock
Bartender
Posts: 10336
Eclipse IDE Hibernate Java
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Why do you try to call your Applet code from your Servlet? Why does your Applet not have an init() method?

Are you aware that Servlets run on the server and Applets run in the client browser? If you are looking to have a n Applet tell you the version of Java the client browser is using you'll need to write an Applet that send this data as a request to the Servlet. Also, are you aware that the Object tag can be used to specify the Java version?
 
sekar bala
Greenhorn
Posts: 27
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I want to check the java version in client side when the request comes.Thats why i want to load it from servlet.Is init() method is compulsory for applet programming.But when i run the applet alone it is working.
 
Paul Sturrock
Bartender
Posts: 10336
Eclipse IDE Hibernate Java
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator

Thats why i want to load it from servlet

All that would achieve (if it were possible) is test the Java version on the server, not the client.

How do you "run" the applet? See this.

 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic