import java.net.HttpURLConnection; import java.net.URL; import lotus.domino.AgentBase; public class JavaAgent extends AgentBase { // Change these settings below to your setup as required. static final String targetURL = "http://URL_OF_YOUR_XPAGE_AND_OPTIONAL_QUERYSTRING"; static final String USER_AGENT = "Mozilla/5.0"; public void NotesMain() { try { final URL url = new URL(JavaAgent.targetURL); final HttpURLConnection httpUrlConnection = (HttpURLConnection) url.openConnection(); httpUrlConnection.setRequestMethod("GET"); httpUrlConnection.setRequestProperty("User-Agent", JavaAgent.USER_AGENT); httpUrlConnection.getResponseCode(); } catch (final Exception e) { // YOUR_EXCEPTION_HANDLING_CODE } } }