public static void populateBean(Object bean, ActionContext ac) {

		Method[] methods = bean.getClass().getMethods();

		for (Method m : methods) {
			String methodNameLower = m.getName().toLowerCase();
			if (m.getName().toLowerCase().startsWith("set")) {
				String assumedFieldName = methodNameLower.substring(3);
				if (assumedFieldName.length() > 0 && ac.containsParameterNoCase(assumedFieldName)) {
					// call the setter, and pass in the value
					try {
						// TODO: Make this work for arrays
						// need to convert to the correct type
						Object paramConverted = BeanUtils.coerceParameter(ac.getParameterNoCase(assumedFieldName), m.getParameterTypes()[0]);
						m.invoke(bean, paramConverted);
					} catch (IllegalArgumentException e) {
						logger.log(Level.INFO, e.getMessage(), e);
					} catch (IllegalAccessException e) {
						logger.log(Level.INFO, e.getMessage(), e);
					} catch (InvocationTargetException e) {
						logger.log(Level.INFO, e.getMessage(), e);
					}
				}
			}
		}

	}