
org.hudsonci.plugins.deploy.weblogic.util.URLUtils Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of weblogic-deployer-plugin Show documentation
Show all versions of weblogic-deployer-plugin Show documentation
This plugin deploy artifacts built on a CI server Hudson to a weblogic target (managed server, cluster ...) as an application or a library component.
The newest version!
/**
*
*/
package org.hudsonci.plugins.deploy.weblogic.util;
import java.net.HttpURLConnection;
import java.net.URL;
/**
* @author rchaumie
*
*/
public class URLUtils {
public static final String HTTP_PROTOCOL_PREFIX = "http";
/**
*
* @param URLName
* @return
*/
public static boolean exists(String URLName){
try {
HttpURLConnection.setFollowRedirects(false);
HttpURLConnection con = (HttpURLConnection) new URL(URLName).openConnection();
con.setRequestMethod("HEAD");
return (con.getResponseCode() == HttpURLConnection.HTTP_OK);
}
catch (Exception e) {
return false;
}
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy