return;
}
final AbstractUIFile input = (AbstractUIFile) component;
TobagoMultipartFormdataRequest request = null;
final Object requestObject = facesContext.getExternalContext().getRequest();
if (requestObject instanceof TobagoMultipartFormdataRequest) {
request = (TobagoMultipartFormdataRequest) requestObject;
} else if (requestObject instanceof HttpServletRequestWrapper) {
final ServletRequest wrappedRequest
= ((HttpServletRequestWrapper) requestObject).getRequest();
if (wrappedRequest instanceof TobagoMultipartFormdataRequest) {
request = (TobagoMultipartFormdataRequest) wrappedRequest;
}
}
// TODO PortletRequest ??
if (request == null) {
// should not be possible, because of the check in UIPage
LOG.error("Can't process multipart/form-data without TobagoRequest. "
+ "Please check the web.xml and define a TobagoMultipartFormdataFilter. "
+ "See documentation for <tc:file>");
} else {
final FileItem item = request.getFileItem(input.getClientId(facesContext));
if (LOG.isDebugEnabled()) {
LOG.debug("Uploaded file name : \"" + item.getName()
+ "\" size = " + item.getSize());
}