File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
The moose likes Servlets 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 Soft Skills this week in the Jobs Discussion forum!
JavaRanch » Java Forums » Java » Servlets
Bookmark "applet-servlet communication" Watch "applet-servlet communication" New topic
Author

applet-servlet communication

Ron Knight
Greenhorn

Joined: Dec 01, 2000
Posts: 1
I have an applet that talks to a servlet in order to get information from an informix database. The servlet connects to the database using JDBC. It actually uses the code from the
"common.jar" file.(Which by the way has proved to be very handy)
This has worked fine on an NT box, but when I try to run it on a Unix box I get this exception message >>
ObjectServer: java.io.NotSerializableException: com.informix.jdbc.IfxResultSet
Ashwin Desai
Ranch Hand

Joined: Jul 17, 2000
Posts: 124
Hi,
what is common.jar? some informix specific library.
If you look at the Java 1.2 API you will find that ResultSet is not Serializable.
Ashwin.
Ashwin Desai
Ranch Hand

Joined: Jul 17, 2000
Posts: 124
An addition to the above answer:
Refering to the Java 1.2 API for ResultSet, therer are functions like updateRow() and updateString() which will not be able to work on remote connections as they update the DB directly.
Thus, ResultSet is not serializable and cannot be used accross the network on different machines. However, you can extract the data out of the ResultSet and send that across the network.
Hope this helps.
Ashwin.
Thomas Paul
mister krabs
Ranch Hand

Joined: May 05, 2000
Posts: 13974
When passing classes from an applet to a servlet only Serializable classes can be sent. ResultSet is not Serializable.


Associate Instructor - Hofstra University
Amazon Top 750 reviewer - Blog - Unresolved References - Book Review Blog
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: applet-servlet communication