Win a copy of Java Concurrency Live Lessons this week in the Threads forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

where to put oeject passed between applet and servlet  RSS feed

may Lee
Ranch Hand
Posts: 68
  • Mark post as helpful
  • send pies
  • 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.*;

public class dataStructure extend Object implements{

My appletToServlet is like:

import myObjectclass.*;
public appletToservlet {

My servletToapplet is like

import myObjectclass.*;
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, but he didn;t mention where to put the object passed between applet and servlet.Please any advise me!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!