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 Applets 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 » Applets
Bookmark "Applet - Servlet Communication" Watch "Applet - Servlet Communication" New topic
Author

Applet - Servlet Communication

Girish Solanke
Greenhorn

Joined: Mar 03, 2006
Posts: 13
Hi All,

I want to pass the varialble from Applet to Servlet.
I have wriiten code for that,
But Apllet is not loaded by the use of Tomcat[version used --> 4.* to 5.5].
It says that classnotfound Exception.......

I used html file to Call Applet,
then Applet has to Call the servlet,
But it is not working ...............
Ulf Dittmer
Marshal

Joined: Mar 22, 2005
Posts: 41149
    
  45
Hello "g ssssss"-

Welcome to JavaRanch.

On your way in you may have missed that JavaRanch has a policy on display names, and yours does not comply with it - please adjust it accordingly, which you can do right here. Thanks for your prompt attention to this matter.

Enjoy your time here.


Ping & DNS - my free Android networking tools app
Ulf Dittmer
Marshal

Joined: Mar 22, 2005
Posts: 41149
    
  45
As to your question, there are several things to investigate and/or describe for us:
  • Does the applet work when run locally from the filesystem, instead of off the web server?
  • Are there any messagea in the Java Console?
  • What does the applet tag look like?
  • Where do you keep the class files on the web server?
  • Are the classes downloadable manually?


  • [ March 03, 2006: Message edited by: Ulf Dittmer ]
    Girish Solanke
    Greenhorn

    Joined: Mar 03, 2006
    Posts: 13
    Originally posted by Ulf Dittmer:
    As to your question, there are several things to investigate and/or describe for us:
  • Does the applet work when run locally from the filesystem, instead of off the web server?
  • Are there any messagea in the Java Console?
  • What does the applet tag look like?
  • Where do you keep the class files on the web server?
  • Are the classes downloadable manually?


  • [ March 03, 2006: Message edited by: Ulf Dittmer ]
    Girish Solanke
    Greenhorn

    Joined: Mar 03, 2006
    Posts: 13
    Originally posted by Ulf Dittmer:
    As to your question, there are several things to investigate and/or describe for us:
  • Does the applet work when run locally from the filesystem, instead of off the web server?

  • Ya it is Working ....
  • Are there any messagea in the Java Console?

  • No
  • What does the applet tag look like?

  • <APPLET NAME="myApplet" CODE="com.servlets.EchoApplet"
    WIDTH=400 HEIGHT=400></APPLET>
  • Where do you keep the class files on the web server?

  • it is in class folder in WEB-INF
  • Are the classes downloadable manually?

  • I am not UNDERSTAND this Question ............


    [ March 03, 2006: Message edited by: Ulf Dittmer ]
    Ulf Dittmer
    Marshal

    Joined: Mar 22, 2005
    Posts: 41149
        
      45
    Hello Girish-

    Thanks for changing your screen anme. It's still not quite right, though, because it needs to contain a first name and a last name. Please change it again so that it conforms to the policy.

    Where do you keep the class files on the web server?
    it is in class folder in WEB-INF

    That's the problem then. The class/jar files need to be in the same directory as the applet. The servlet engine will not serve any files to a client that are located inside the WEB-INF directory.
    Ben Zung
    Ranch Hand

    Joined: Mar 25, 2004
    Posts: 109
    I don't know why but this had worked for me.

    My applet: TestApplet.class
    Package: my.applet.test
    (And the html is in the same level of dir "my".

    Non-working version:
    <applet code="TestApplet.class" codebase="my/applet/test" ...>

    Working version:
    <applet code="my/applet/test/TestApplet.class" codebase="." ...>

    Good luck.
     
    I agree. Here's the link: http://aspose.com/file-tools
     
    subject: Applet - Servlet Communication
     
    Similar Threads
    Applet -Servlet Communication (geting & sending values)
    Probelm in applet/servlet communication
    Servlet can Call an Applet
    from a applet how can i call a servlet??
    invoking servlet from applet