Q:

Serialize and store an Controller object

Does the object contains all the state of pages,desktop, (like a snapshot) What does an controller object actually store.
Is there any way to store the complete data and components on an page into an object. I want to retrieve same page state.
This shall clear problem:
I want to store complete state of particular portion of web application, and then when I reload the page I want to set the view of the portion that I have saved earlier.

A:

You can do it if you intercept (or wrap) the servlet output stream. You can store content returned by your application per request URL, so you will be able to retrieve the state of the application byte-by-byte.
EDIT.
Here how you can implement this. Controller is a servlet that implements doGet() and/or doPost. 
Here is how the signature of all such methods look like:
protected void doGet(HttpServletRequest req, HttpServletResponse resp)
The typical pattern of code looks like: 
// do somthing and get data.
resp.getOuputStream().write(somthing);

You can write your own output stream (or writer) that extends OutputStream and wraps 2 palyload streams: servlet stream and file stream. It overrides its write method like the following:
public abstract void write(int b) throws IOException {
    fileOut.write(b);
    servletOut.write(b);
}

Now each byte is written both to the web client and to file.

