Win a copy of Testing JavaScript Applications this week in the HTML Pages with CSS and JavaScript forum!
  • 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 all forums
this forum made possible by our volunteer staff, including ...
  • Campbell Ritchie
  • Bear Bibeault
  • Ron McLeod
  • Jeanne Boyarsky
  • Paul Clapham
  • Tim Cooke
  • Liutauras Vilda
  • Junilu Lacar
Saloon Keepers:
  • Tim Moores
  • Stephan van Hulst
  • Tim Holloway
  • fred rosenberger
  • salvin francis
  • Piet Souris
  • Frits Walraven
  • Carey Brown

Please help: applet and servlet comunicattion

Posts: 24
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi folks!

I have a problem and I don't know how to solve it!

I'm in a applet and I have to invoke an action in a servlet.
But, to execute this action, I need some info from the client.

I could transfer it by the URL calling the showDocument() of AppletContext. But appears that it doesn't accept more than 255 characters on the URL. If it has more, notthing happens when I call it.

So I thought use RMI connection or socket... but I'm not sure!

It has another better solution?
Joao Cunha
Ranch Hand
Posts: 105
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Well, what Joe has said is right, use a URLConnection, here's an example :
The applet looks something like this -

while your servlet would look something like this -

Simple, huh?
I was born with webbed fish toes. This tiny ad is my only friend:
Thread Boost feature
    Bookmark Topic Watch Topic
  • New Topic