• 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

Communication between Applets and Servlets

 
Ranch Hand
Posts: 70
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi All,,
I dont know where to post this query.Since it is more related to Servlets so I am posting it in this forum.
My question is :
How does an Applet communicates with Servlet.
Thanks in advance.
 
Ranch Hand
Posts: 135
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

Originally posted by Nilesh Srivastava:
Hi All,,
How does an Applet communicates with Servlet.


First the servlet to which you want to send parameters should be on the same server where applet is present.
Coming to passing parameters to the servlet , you can do this in two ways
i) Construct url manually. In this approach you should take care of parameter encoding.This can be tricky.
for eg:
to invoke DetailsServlet with parameters name and age
use DetailsServlet?name=abc&age=22
ii)Make use of URLEncoder and URLDecoder classes.
 
reply
    Bookmark Topic Watch Topic
  • New Topic