Lotus Software logo
IBM Lotus Domino Designer 8.5
  Versions 8.5 and 8.5.1






Examples: HttpURL property

This agent gets the HTTP URL for a server. The agent varies the display depending on whether access is through Notes (the URL is blank) or HTTP protocols.

import lotus.domino.*;

import java.io.PrintWriter;

public class JavaAgent extends AgentBase {

public void NotesMain() {

try {
Session session = getSession();
AgentContext agentContext = session.getAgentContext();

// (Your code goes here)

// Get URL
String httpURL = session.getHttpURL();

// Assume local if http is blank
if (httpURL.length() == 0) {
System.out.println("Http URL = None");
}

// If http exists print info assuming output to browser
else {
PrintWriter pw = getAgentOutput();
pw.println("HttpURL = " + httpURL);
}

} catch(Exception e) {
e.printStackTrace();
}
}
}

Related topics
HttpURL property




Library | Support | Terms of use |

Last updated: Monday, October 5, 2009