Win a copy of Five Lines of Code this week in the OO, Patterns, UML and Refactoring 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

Problem loading applets in servlet

 
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..
 
Ranch Hand
Posts: 153
Oracle Java
  • 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
 
Bartender
Posts: 10336
Hibernate Eclipse IDE 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
Hibernate Eclipse IDE 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.

 
So there I was, trapped in the jungle. And at the last minute, I was saved by 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