super.renderResponse(requestContext, component);
// if there is a maxLength binding, then throw this value into the HttpSession
// to allow it be used by the request handler during Mime parsing. Note that we
// us the HttpSession so we avoid any issues with locking the AWSession.
AWSession session = session();
if (parent().hasBinding(BindingNames.maxLength)) {
Integer maxLength = new Integer(intValueForBinding(BindingNames.maxLength));
session.httpSession().setAttribute(fileUploadName(),maxLength);
}
if (parent().hasBinding(BindingNames.encrypt)) {
boolean encrypt = booleanValueForBinding(BindingNames.encrypt);
if (encrypt && parent().hasBinding(BindingNames.file)) {
throw new AWGenericException("File binding not supported when encrypt is requested. Use inputStream binding instead.");
}
session.httpSession().setAttribute(BindingNames.encrypt +"."+fileUploadName(),
encrypt);
}
// stash the user's preferred locale for use to construct localized messages
session.httpSession().setAttribute(Locale.class.getName(), session.preferredLocale());
}