Spring MVC contains an AjaxUtils class that includes an ajax detection method:
public class AjaxUtils {
public static boolean isAjaxRequest(WebRequest webRequest) {
This application class was modified to detect the Faces-Request parameter that the ICEmobile containers currently send, but the X-Requested-With header set by jQuery should also be considered. Note that we may need to distinguish between full page and ajax requests in the container; however a full-page request should be a new method since the current ice.upload() does not replace the current page with the HTTP response.
UtilInterface was modified to continue scanning the serialized form even if a "file" was not valid. The problem occurred in a Spring sample where an element was named "file" but was not a file upload. Appending -file to the field name is likely not sufficient (due to cases like this) so we may want to modify the mechanism further.