This week's book giveaway is in the OCMJEA forum.
We're giving away four copies of OCM Java EE 6 Enterprise Architect Exam Guide and have Paul Allen & Joseph Bambara on-line!
See this thread for details.
The moose likes Servlets and the fly likes again, the class object passed between applet and servlet Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of OCM Java EE 6 Enterprise Architect Exam Guide this week in the OCMJEA forum!
JavaRanch » Java Forums » Java » Servlets
Bookmark "again, the class object passed between applet and servlet" Watch "again, the class object passed between applet and servlet" New topic
Author

again, the class object passed between applet and servlet

may Lee
Ranch Hand

Joined: Nov 20, 2003
Posts: 68
I have a class object passed between Applet on Apache web server and servelt on Tomcat. The applet first passes this object with some parameters to servlet, then servlet passes back the object with changed parameters. I check with Tomcate, this class seems should be in /common/shared/classes to be shared with all web application.

But how can applet know this class is here? Shall I include /common/shares/ in the CLASSPATH?
How applet and servlet import this class?

public class dataTransfer extends Object implements java.io.Serializable{
public int dyear,dmonth;
public dataTransfer(){
setTime(0,0);
}
public void setTime(int arg1,int arg2){
dyear=arg1;
dmonth=arg2;
}

}
Carl Trusiak
Sheriff

Joined: Jun 13, 2000
Posts: 3340
It must be in the Classpath for both. Since most Servlet Containers prevent access to these areas in means a copy in two places. One in the Webapp's classpath and one in the Applets Classpath. You set the classpath for the applet using the code or archive tags.


I Hope This Helps
Carl Trusiak, SCJP2, SCWCD
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: again, the class object passed between applet and servlet