Sevlets « serialize « Java I/O Q&A





1. where should I put the serializable object class    coderanch.com

I add a "System.out.println" message in servlet file and it showed up in command window(Tomcat) when I click on aplet. But I just can't get the object transfered from applet. I wonder if there is something I didn't notice. Thanks, Bill. I will try your way again. I will post here if I find out anything. Jenny

2. can someone explain implements Serializable    coderanch.com

No it won't improve performance. Why would you think it would? All that happens when you implement Serializable (which, remember is a "Tag" interface that does not define any methods) is that that object can now be Serialized to a Stream or File by the Java object Serialization framework. That is useful (for instance) if you are using Session clustering of ...

3. SERIALIZABLE INTERFACE    coderanch.com

Why do we need to implement Serializable interface on Java Beans (getter/setter methods)? In my application, I am implementing Serializable interface for all java beans. I know that, I am doing it for the persistence. But I neither use ObjectInput/OutputStreams to read and write to file system, hard disk and nor handle any other kind of persistence when system crashes/or when ...

4. Good way to cast unknown Serialized Object types?    coderanch.com

I have a web application (written primarily using Struts) that allows long database queries (and other processes that could take a while to complete) to run as background Threads. While these processes are running, a user may view the status page of these "Jobs", which auto-refreshes itself every so often, or the user can check the status of it later by ...

5. java.io.Serializable Problem    coderanch.com

Hello Friends, Iam programming a muticlient, chatserver based on appletservlet communication. When I tried to pass Enumeration object to ObjectOutputStream's, writeObject(Object obj) method I got an exception at runtime (not at compile time) stating that Enumeration doen't implements Serializable interface. Then I created a class, SerializableWrapper that implements Serializable interface and wraps any Object. Eventhough I got the same exception, then ...

6. When to use Serializable    coderanch.com

Hi Martin, Firstly, I'm no guru, so what you read below should be taken as opinion only. So, your question is should you implement java.io.Serializable on your value object. It's certainly a reasonable thing to do, but whether you actually do it or not might depend on the answer to your second question. Do you need to serialize the value object? ...

7. Serialization    coderanch.com

9. serialization using http    coderanch.com





10. Serialization concept    coderanch.com

11. Implement Serializable judiciously?    coderanch.com

All my beans implement the interface Serializable. Though I am not sure about the saying "Stateful workaround in a stateless Protocol" I just implemented it without really knowing the danger/benefits. We're still in the early process of our development and removing it wouldn't do much trouble. What do you guys thing? Thank you! [ November 02, 2006: Message edited by: Bear ...

12. I have a Doubt On Serialization    coderanch.com

13. value object serialization    coderanch.com

14. y to implement serializable in getter & setter ?    coderanch.com

The data you are going to set or get using getter or setter method some times may need to pass through network from one remote to another remote system.Serializable is property that allows you to write the data or the object state into an output stream and fetch it back from there...

15. Where Serialization is implemented    coderanch.com

Hi, Java serialization is implemented internally by the JRE itself. You don't need to do anything special, other than marking your application class as implementing Serializable interface. If at all you want to customize serialization of your class, add two methods - writeObject() and readObject() - to your class. It's extremely rare for web apps to store data in java serialization ...

16. Serialization Problem    coderanch.com

Thanks, but I got no idea.. On the server, the top directory is web-root I think. I just put the path as "BankAppFolder/ABC.ser", where BankAppFolder is in the same directory as the war file. I donno if it works yet, cause it takes time for them to reload it. Thats why I don't really want to reload it 50 times trying ...