File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
The moose likes Struts and the fly likes Struts serialisation  bedween the action Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Frameworks » Struts
Bookmark "Struts serialisation  bedween the action" Watch "Struts serialisation  bedween the action" New topic

Struts serialisation bedween the action

Andy Dejung

Joined: Sep 05, 2002
Posts: 20
I used Struts for some projects and it is great, but one weak point I do not like is the serialisation bedween the action. If i forward one request to several action then every time the form has to be serialised and deserialised this can be very time consuming.
Did I miss something to go around this?
Tom Stevns
Ranch Hand

Joined: Nov 20, 2001
Posts: 122
Hello Andy Dejung !
Probably this would help you ?
If not, the view components are serialised and sent ... The components are then deserialised,
given new ... collaboratively editing, resulting in fast editing response ...
Good luck !

Regards Tom Stevns, SCJP2
Ted Husted
Ranch Hand

Joined: Dec 02, 2002
Posts: 37
Struts is primarily designed as a J2SE framework. Generally, the traffic between the browser and the action would not need to be serialized (in the formal sense of the word). If you are making Remote Method Invocations to another server to access persistant data, that can be done from the Action *after* all the ActionForm data has been obtained and validated.
HTH, Ted.

<a href="" target="_blank" rel="nofollow">Struts in Action</a>
Andy Dejung

Joined: Sep 05, 2002
Posts: 20
Thanks for your answers.
But as I see from your answers I maybe did not express my problem clearly. So I will try it again this time on a example.
Lets say I have a busniess case which should get some person data form a host system and from a other DB.
In Struts I split the case in two tasks (Action). The first Action (HostAction) will perform the host lookup and getting the data from the host. The secound Action (DBAction)will perform the DB lookup and get its data form the DB.
In this scenario I get in the HostAciton the ID of the person out of the Form. Make the lookup and get the data from the host. Then I store the data in the Form and call the next Action (DBAction). In the DBAction I get again the ID and get out of the DB the data. I write this data also into the Form.
Now I call the JSP and display all data.

Now my problem:
The data from the Host which are passed first to the DBAction and then to the JSP, are serialised twice, once for the request of the DBAction and once again for the JSP.
My question is now: Is there a way to call another Action (DBAction) without serilisation bedween. As the Action run in the same Servletcontainer and are called from the same Servlet.
I hope I could now express my problem
Thanks again for any comment
I agree. Here's the link:
subject: Struts serialisation bedween the action
It's not a secret anymore!