// Get the path to which we will forward to display the message
final String path = getFileUploadExceededExceptionPath(request);
if (path == null)
throw exception;
final StripesRequestWrapper wrapper;
final ActionBeanContext context;
final ActionBean actionBean;
try {
// Create a new request wrapper, avoiding the pitfalls of multipart
wrapper = new StripesRequestWrapper(request) {
@Override
protected void constructMultipartWrapper(HttpServletRequest request)
throws StripesServletException {
setLocale(configuration.getLocalePicker().pickLocale(request));
}
};
// Create the ActionBean and ActionBeanContext
context = configuration.getActionBeanContextFactory().getContextInstance(wrapper,
response);
actionBean = configuration.getActionResolver().getActionBean(context);
wrapper.setAttribute(StripesConstants.REQ_ATTR_ACTION_BEAN, actionBean);
}
catch (ServletException e) {
log.error(e);
throw exception;
}