• 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

How to call Servlet from Applet?

 
Greenhorn
Posts: 15
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi Im new to Applets.

Would anyone please tell me how to invoke servlet from a applet? I just want to execute a servlet when user will click on a button on applet.

Thanks
-Aman
 
author and iconoclast
Posts: 24207
46
Mac OS X Eclipse IDE Chrome
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
You could use getAppletContext().showDocument() if the servlet's output is s Web page you want to display. Otherwise, just use the java.net.URLConnection class.
 
Greenhorn
Posts: 9
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I am working on a problem similar to this. When I use getAppletContext().showDocument() to invoke my servlet to produce output to be displaying in a web browser, everything works great.

The problem is that the servlet does not receive the session info from the applet. In fact, request.getSession(false) returns null.

Any suggestions? Is there an Apache setting that I need to configure?

Thanks,
Sean
 
reply
    Bookmark Topic Watch Topic
  • New Topic