myContent = createVelocityContainer("iframe_index");
if (!usetunnel) { // display content directly
String rawurl = TUConfigForm.getFullURL(proto, host, port, startUri, firstQueryString).toString();
myContent.contextPut("url", rawurl);
} else { // tunnel
final Identity ident = ureq.getIdentity();
if (user != null && user.length() > 0) {
httpClientInstance = HttpClientFactory.getHttpClientInstance(host, port.intValue(), proto, user, pass);
} else {
httpClientInstance = HttpClientFactory.getHttpClientInstance(host, port.intValue(), proto, null, null);
}
final Locale loc = ureq.getLocale();
Mapper mapper = new Mapper() {
public MediaResource handle(String relPath, HttpServletRequest hreq) {
MediaResource mr = null;
String method = hreq.getMethod();
String uri = relPath;
HttpMethod meth = null;
if (uri == null) uri = (startUri == null) ? "" : startUri;
if (uri.length() > 0 && uri.charAt(0) != '/') uri = "/" + uri;
//String contentType = hreq.getContentType();
// if (allowedToSendPersonalHeaders) {
String userName = ident.getName();
User u = ident.getUser();
String lastName = u.getProperty(UserConstants.LASTNAME, loc);
String firstName = u.getProperty(UserConstants.FIRSTNAME, loc);
String email = u.getProperty(UserConstants.EMAIL, loc);
if (method.equals("GET")) {