code: protected void restoreFields(Collection<Field> fields, ActionBean actionBean, ActionBeanContext context) throws IllegalAccessException {
          HttpSession session = context.getRequest().getSession(false);
          if (session != null) {
  	        Set<String> parameters = this.getParameters(context.getRequest());
  	        for (Field field : fields) {
  	            if (!field.isAccessible()) {
  	                field.setAccessible(true);
  	            }
  	            if (!parameters.contains(field.getName())) {
  	                // Replace value.
  	                Object value = session.getAttribute(getFieldKey(field, actionBean.getClass()));
  	                // If value is null and field is primitive, don't set value.
  	                if (!(value == null && field.getType().isPrimitive())) {
  	                    field.set(actionBean, value);
  	                }
  	            }
  	        }
          }
      }
docs: Restore all fields from value stored in session except if they.
  @param fields Fields to restore from session.
  @param actionBean ActionBean.
  @param context ActionBeanContext.
  @throws IllegalAccessException Cannot get access to some fields.