Andrew McDonough

Please note: This page is imported from my wiki, which hasn't been updated in over 10 years. Some of the formatting was lost during the import. I'll try to get around to fixing it someday.

Struts

Use Mesage Resources to handle multiple languages and to avoid hard coding text. http://www.systemmobile.com/articles/strutsMessageResources.html

Use BeanUtils CopyProperties and CopyProperty to populate form beans from business beans and vice versa.

BeanUtils

Transferring data between tiers can prove a pain, particularly having to check for null values and converting to the appropriate type. Fortunatley Jakarta provide two useful methods that will look after this for you:

CopyProperties(Object dest, Object src)

CopyProperty(Object dest, String field, Object value);


Andrew McDonough

Andrew McDonough is a consultant CTO and software developer, currently based between Berlin and London.

Follow Andrew on Twitter or Connect on LinkedIn