/** * Determine whether a file resource should be opened in the current window or a new window. * * @param contentType * The content type to check * @return A string identifying the window in which to open the resource: "_self" to open the resource in the current window, "_blank" for a new window, or an empty string if the resource is not a file. */ public static String getResourceTarget(String contentType) { // we will open a new window unless... String rv = "_blank"; // get the resource's type if (contentType != null) { // if the browser will not inline, but mark as attachments, let's not open a new window if (!letBrowserInline(contentType)) { rv = "_self"; } } return rv; } // getResourceTarget
String disposition = null; if (Validator.letBrowserInline(contentType))