aspose file tools*
The moose likes Applets and the fly likes JSP and Applet Communication Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » Applets
Bookmark "JSP and Applet Communication" Watch "JSP and Applet Communication" New topic
Author

JSP and Applet Communication

sekar bala
Greenhorn

Joined: Oct 06, 2010
Posts: 27
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.


Regards
Sekar Bala
Paul Sturrock
Bartender

Joined: Apr 14, 2004
Posts: 10336

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.


JavaRanch FAQ HowToAskQuestionsOnJavaRanch
sekar bala
Greenhorn

Joined: Oct 06, 2010
Posts: 27
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

Joined: Apr 14, 2004
Posts: 10336

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

Joined: Oct 06, 2010
Posts: 27
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.
Ulf Dittmer
Marshal

Joined: Mar 22, 2005
Posts: 41865
    
  63
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).


Ping & DNS - my free Android networking tools app
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: JSP and Applet Communication