• 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

Applet to HTML

 
Greenhorn
Posts: 26
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I want to pass a value from an applet to the HTML page (which contains the applet) .This should happen on click event of a button in the applet.
 
Ranch Hand
Posts: 122
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
just run a servlet on server side from where the applet has been loaded to client machine
now pass this value to servlet by response object.
 
Revati Pathak
Greenhorn
Posts: 26
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
hi,
i know i can easily do it using servlets but i don't want to use servlet.
regards,
-Revati

Originally posted by maateen ashraf:
just run a servlet on server side from where the applet has been loaded to client machine
now pass this value to servlet by response object.


 
Ranch Hand
Posts: 324
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Sorry for my ignorance, but I could not understand the question. What do you mean by passing a value from an applet to the HTML page containing it?? Can you be more specific? What value you want to pass, to what object? Do you want the HTML page to change- how, what, when??
 
Ranch Hand
Posts: 44
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi! Maateen
sorry i did not get what you what to tell.
how can we pass a value to a servlet through response object. i believe we can pass a value only through request only.
and even then how can we pass it to the html which is running that applet which is calling the servlet.
pls explain
 
maateen ashraf
Ranch Hand
Posts: 122
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
u can use URL class to send html to browser..
try it
 
maateen ashraf
Ranch Hand
Posts: 122
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
hi Ramneek Handa
u will use request object to send values to servlet
&
use response object to pass it to browser
 
Rahul Rathore
Ranch Hand
Posts: 324
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi mateen
If we send a response using response object, it will send a new HTML page [B] to the browser. But the Revati's original question is - how to pass values from the applet, to HTML page [B] containing the applet. I could not understand

Originally posted by maateen ashraf:
hi Ramneek Handa
u will use request object to send values to servlet
&
use response object to pass it to browser


 
Greenhorn
Posts: 20
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
hi,
i'm not sure how to pass the value from the applet to the web-page but don't u think if u're able to pass a value to the HTML page u're actually making a dynamic page from an applet ,and i suppose a servlet is supposed to do this,generate a dynamic page
 
Ranch Hand
Posts: 213
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi,
Try this:
AppletContext ac = getAppletContext();
ac.showDoucumet(new URL("your htmlpage with this applet"?partameters, "_SAME"));
Check the second parameter in the URL constructor for correctness
OK
 
You have to be odd to be #1 - Seuss. An odd little 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