This week's giveaway is in the Android forum.
We're giving away four copies of Android Security Essentials Live Lessons and have Godfrey Nolan on-line!
See this thread for details.
The moose likes Servlets and the fly likes Applet servlet communication Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login

Win a copy of Android Security Essentials Live Lessons this week in the Android forum!
JavaRanch » Java Forums » Java » Servlets
Bookmark "Applet servlet communication" Watch "Applet servlet communication" New topic

Applet servlet communication

priya shankar
Ranch Hand

Joined: May 12, 2003
Posts: 51
Hi all
Have a look at the following progrm
My Applet

When i call the servlet through a Browser i get the following Exception...

"Protocal Doesn't support the output"
When i called the servlet throug consloe(by running applet)
I get
File not found exception

Please let me know what is the problem
[ June 17, 2003: Message edited by: Cindy Glass ]
Torsten Schippel
Ranch Hand

Joined: May 09, 2003
Posts: 62
Hi priya,
sorry but your code is working fine. I only get the exception if I run it inside the IDE. in this case the getCodeBase returns an incorrect protocol (file://). Set the URL to a complete address like http://localhost/EchoServlet. Then it works inside the IDE or locally.
It is sorta covered in the JavaRanch Style Guide.
subject: Applet servlet communication
Similar Threads
ScrollBar Problem
Stuck between TimerTasks and ObjectOutputStream...(i think)
Server returned HTTP response code: 405
Applet notinitited, please need urgent help
security manager warning