All Downloads are FREE. Search and download functionalities are using the official Maven repository.

org.hudsonci.plugins.deploy.weblogic.util.URLUtils Maven / Gradle / Ivy

Go to download

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