Win a copy of Java 9 Revealed this week in the Features new in Java 9 forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

servlet applet communication  RSS feed

 
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.
 
Don't get me started about those stupid light bulbs.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!