Win a copy of Re-engineering Legacy Software this week in the Refactoring forum
or Docker in Action in the Cloud/Virtualization forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

servlet applet communication

 
Anonymous
Ranch Hand
Posts: 18944
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
what are the ways by which applet and servlet can communicate?
 
Anonymous
Ranch Hand
Posts: 18944
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
hi,
u can communicate with a servlet from an applet by,
1.calling the servlet URL using showDocument method of applet context.(pass servlet URL as param)
2.Another way is to open a connection to servlet using URLConnection reference.
URL url=new URL("servlet url here");
URLConnection uc=url.openConnection();
i think this will work.
u have to prepare the query string yourself if u want to send some values in applet to servlet .
try them.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic