Win a copy of 97 Things Every Java Programmer Should Know this week in the Java in General 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
  • Paul Clapham
  • Jeanne Boyarsky
  • Junilu Lacar
  • Henry Wong
Sheriffs:
  • Ron McLeod
  • Devaka Cooray
  • Tim Cooke
Saloon Keepers:
  • Tim Moores
  • Stephan van Hulst
  • Frits Walraven
  • Tim Holloway
  • Carey Brown
Bartenders:
  • Piet Souris
  • salvin francis
  • fred rosenberger

JSP and Applet Communication

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

I want to get the value of a variable which is dynamically assigned after the applet load in client side.Applet is emded in a jsp page.With in that jsp page i want to get that value.please any one help me.Source code is given below


JSP Page:

Now i Want to access the javaversion variable in the jsp page.If i access that variable it is giving null value.How to get the variable with value.I need help urgently.
 
Bartender
Posts: 10336
Hibernate Eclipse IDE Java
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Have we not bee through this before? Servlets run on the server, Applets run on the client. JSPs are a markup language to create Servlets, so the only way you can write an Applet to tell you the JVM version being used in the client browser is to make a request to a Servlet with this data from the Applet.
 
sekar bala
Greenhorn
Posts: 27
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
How to make a request from a applet to a servlet with the JVM Value.If you know that please help me.
 
Paul Sturrock
Bartender
Posts: 10336
Hibernate Eclipse IDE Java
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Have a look the java.net package. That explains the classes the SDK provides to implement network applications.

One question though - is there a reason you need to know the JVM version being used in the client browser? I'm just curious, because (for certain situations) there are easier ways to find this out.
 
sekar bala
Greenhorn
Posts: 27
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
ya the reason i want to find the JVM version is.I am having applet in my site so if user dont have JVM then site will crash after few pages.Thats why i am find when user enters the site itself.If you know any other ways to find JVM version other than loading applets please let me know.
 
Rancher
Posts: 43016
76
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Start by putting this on the web page. In case an insufficient version (or no version) was found, the JavaScript code can take the user to some other page (and possibly pass the Java version it found as a parameter, if that's still relevant at that point).
 
Mo-om! You're embarassing me! Can you just read a tiny ad like a normal person?
Devious Experiments for a Truly Passive Greenhouse!
https://www.kickstarter.com/projects/paulwheaton/greenhouse-1
    Bookmark Topic Watch Topic
  • New Topic