The Artima Developer Community
Sponsored Link

Legacy Java Answers Forum
August 2000

Advertisement

Advertisement

This page contains an archived post to the Java Answers Forum made prior to February 25, 2002. If you wish to participate in discussions, please visit the new Artima Forums.

Message:

JavaServlets and Applet communication!

Posted by Anu on May 25, 2001 at 12:43 PM

Hi All,

I have problems with making my applet communicate with the servlet.
Here is the directory structure:

jsdk2.1
|_ startserver ( web server )
|
___V________________
| |
| |
| |
/examples /webpages
| |__applet.html
| |__index.html
/WEB-INF |
|
|
/servlets
|__appletEg.class
|__RetFileServlet.class
|__appletServlet.class
|

In the applet.html file, I am loading the applet ,appletEg.class.
appletEg.class connects to the URL http:/localhost:8080/examples/servlet/RetFileServlet
and retrieves the information it gives and shows it in the applet.
In the applet.html
I have this,


This works fine when I run
%appletviewer applet.html

But when I try to see the applet in the browser,
it gives me an error: Applet appletEg can't start:ERROR.

But for my project which is web application I should be able to see it
in the browser.
I need help ASAP, Its my project work and I dont know
whats the problem. Am an amatuer.
Could anybody help me with this!

Thanks in advance
Anu



Replies:

Sponsored Links



Google
  Web Artima.com   
Copyright © 1996-2009 Artima, Inc. All Rights Reserved. - Privacy Policy - Terms of Use - Advertise with Us