• 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
  • Ron McLeod
  • Rob Spoor
  • Tim Cooke
  • Junilu Lacar
Sheriffs:
  • Henry Wong
  • Liutauras Vilda
  • Jeanne Boyarsky
Saloon Keepers:
  • Jesse Silverman
  • Tim Holloway
  • Stephan van Hulst
  • Tim Moores
  • Carey Brown
Bartenders:
  • Al Hobbs
  • Mikalai Zaikin
  • Piet Souris

Applet - Servlet Communication

 
Greenhorn
Posts: 13
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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 ...............
 
Rancher
Posts: 43026
76
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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.
 
Ulf Dittmer
Rancher
Posts: 43026
76
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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
    Posts: 13
    • Mark post as helpful
    • send pies
      Number of slices to send:
      Optional 'thank-you' note:
    • Quote
    • Report post to moderator

    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
    Posts: 13
    • Mark post as helpful
    • send pies
      Number of slices to send:
      Optional 'thank-you' note:
    • Quote
    • Report post to moderator

    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
    Rancher
    Posts: 43026
    76
    • Mark post as helpful
    • send pies
      Number of slices to send:
      Optional 'thank-you' note:
    • Quote
    • Report post to moderator
    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.
     
    Ranch Hand
    Posts: 109
    • Mark post as helpful
    • send pies
      Number of slices to send:
      Optional 'thank-you' note:
    • Quote
    • Report post to moderator
    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.
     
    You showed up just in time for the waffles! And this tiny ad:
    Building a Better World in your Backyard by Paul Wheaton and Shawn Klassen-Koop
    https://coderanch.com/wiki/718759/books/Building-World-Backyard-Paul-Wheaton
    reply
      Bookmark Topic Watch Topic
    • New Topic