• 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:
  • Tim Cooke
  • Campbell Ritchie
  • Paul Clapham
  • Ron McLeod
  • Liutauras Vilda
Sheriffs:
  • Jeanne Boyarsky
  • Rob Spoor
  • Bear Bibeault
Saloon Keepers:
  • Jesse Silverman
  • Tim Moores
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
Bartenders:
  • Piet Souris
  • Al Hobbs
  • salvin francis

where to put oeject passed between applet and servlet

 
Ranch Hand
Posts: 68
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I have Redhat 9, Apache,Tomcat 4.1.30:Tomcat is able to run at: http://local/exapples, no need http://localhost:8080/examples
Apache web server is running, the home folder is /usr/www/html/

I want to pass a object(my own class) between applet and a servlet. First the Applet passes the object to Servlet with some parameters inside the object, then servlet receives this object and change some data inside the object and pass it back to applet.

My applet is under Apache web server home folder /var/www/html/appletToservlet.class.
My servlet is under $CATALINA_HOME/webapps/examples/servletToapplet.class (I am using webapp to connect Applet and servlet)
My opject class is at /jdk1.2.2/jre/classes. I have serialized this object,like the followings:

package myobjectclass.*;
import javax.servlet.*;
import javax.servlet.http.*;
import java.io.*;

public class dataStructure extend Object implements java.io.Serializable{
...
}

My appletToServlet is like:

import myObjectclass.*;
import...;
public appletToservlet {
..}

My servletToapplet is like

import myObjectclass.*;
import...;
public servletToapplet {
..}


I can compile all these three code, but when I run from Mozilla, I get the class not found error:
myclass.dataSturcture not found.


I exactly follow http://www.j-nine.com/pubs/applet2servlet/Applet2Servlet.html, but he didn;t mention where to put the object passed between applet and servlet.Please any advise me!
 
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