Custom JSP taglib lets you deal with serialized beans. Tag saveBean lets you serialize bean
and save it in the hidden variable, tag restoreBean lets you
extract serialized bean from the request parameter. For example:
Here TestBean instance will be saved in the hidden form field named test.
In your JSP file processed the form you can use some like this:
and in case of servlet you can use some like this:
Tags are:
saveBean
Tag serializes the bean and saves it in the hidden field. Parameters are:
1) field Describes a name for your field.
2) name Optional parameter. Describes a name for your bean in the page (request, session, application) scope.
3) value Optional parameter. Describes a value for your bean.
restoreBean
Tag restores your bean from the request parameter. Parameters are:
1) parameter Describes a name for your parameter.
2) id Optional parameter. Describes a name for the page scope variable with the restored bean.
3) type Optional parameter. Describes a type for your bean. By default is
java.lang.Object.
for downloading:
Library: cstatetag.jar Description: taglib.tld
See also Coldtags suite - the largest collection of custom JSP tags.