Granny's Programming Pearls
"inside of every large program is a small program struggling to get out"
JavaRanch.com/granny.jsp
  • 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
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

Post request from applet?

 
Ranch Hand
Posts: 41
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi
How could I perform a post request(and redirect) to an action page from an applet?
I have tried the following:

The above doesn't seem to work properly, coz it is not "redirect" to the action page.
Please comment.
Cheers
Eric Low
SCJP2
 
Ranch Hand
Posts: 51
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
If u can use html file how about using is as follows:

getAppletContext().showDocument(new URL(getCodeBase(),"/help/GettingStarted.html"),"_self");
 
Eric Low
Ranch Hand
Posts: 41
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi Rakesh
I have tried that as a GET request, but I want it to be a POST request instead.
Any idea?
Eric Low
SCJP2
 
Eric Low
Ranch Hand
Posts: 41
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi All
Have no luck so far. I'm thinking of using Javascript to access the variable in the applet instead rite now.
I have tried something like this:

where getData() is a static method in the applet which returns a String object. However it's not working as well... please help!
Regards
Eric Low
SCJP2
reply
    Bookmark Topic Watch Topic
  • New Topic