Package java.net

Examples of java.net.URL.toExternalForm()


    // http://bugs.sun.com/view_bug.do?bug_id=6746185
    if (isJava1dot5dot0_16
        && defaultUrl != null
        && "jar".equalsIgnoreCase(defaultUrl.getProtocol())) {
      String defaultUrlExternalForm = defaultUrl.toExternalForm();
      if (defaultUrl.toExternalForm().indexOf("!/") == -1) {
        String fixedUrl = "jar:"
          + resourceClass.getProtectionDomain().getCodeSource().getLocation().toExternalForm()
          + "!/" + defaultUrl.getPath();
       
        if (!fixedUrl.equals(defaultUrlExternalForm)) {
View Full Code Here


      }
     
       URL file = new URL(applicationStoreProtocol, applicationStoreHost, applicationStorePort, "/getExtensionDescriptor.do" //$NON-NLS-1$
             + parms);
         if (events != null)
             events.debug(MessageFormat.format(Messages.getString("VPNLauncher.requestApplicationUsing"), new Object[] { file.toExternalForm() })); //$NON-NLS-1$

         URLConnection con = (URLConnection)file.openConnection();
         con.setUseCaches(false);

         try {
View Full Code Here

      // See if there any replacements for this header
      List replacements = WebForwardDatabaseFactory.getInstance().getReplacementsForContent(launchSession.getSession().getUser().getPrincipalName(),
        Replacement.REPLACEMENT_TYPE_SENT_HEADER,
        hdr,
        proxiedURL.toExternalForm());

      Enumeration vals = requestProcessor.getHeaders(hdr);
      while (vals.hasMoreElements()) {
        String val = (String) vals.nextElement();
View Full Code Here

    r.setPolicy(launchSession.getPolicy());

    URL target = new URL(r.replace(webForward.getDestinationURL()));

    if (log.isDebugEnabled()) {
      log.debug("Reverse proxy target  " + target.toExternalForm());
    }
    return target;
  }

  void checkProcessedContent(LaunchSession launchSession, ProxiedHttpMethod method, RequestHandlerRequest request)
View Full Code Here

    public InputStream getDownloadFile(String name, String ticket, String filename) throws IOException {
        URL file = new URL(applicationStoreProtocol, applicationStoreHost, applicationStorePort, "/getApplicationFile.do" //$NON-NLS-1$
            + "?name=" + name + "&ticket=" + ticket + "&file=" + filename); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
        if (events != null)
            events.debug(MessageFormat.format(Messages.getString("ApplicationLauncher.requestApplicationUsing"), new Object[] { file.toExternalForm() })); //$NON-NLS-1$

        URLConnection con = file.openConnection();
        con.setUseCaches(false);

        try {
View Full Code Here

            } catch(MalformedURLException ex) {
              actual = new URL(requestProcessor.getRequestParameters().getProxiedURIDetails().getProxiedURLBase(), Util.urlDecode(val[i]));
            }

            if(cache != null) {
                cache.clear(actual.toExternalForm());
            }
           

                      URL newVal = new URL(requestProcessor.getRequestBaseURL(),
                          "/replacementProxyEngine/" + requestProcessor.getLaunchId() +
View Full Code Here

                + " changing to "
                + newVal
                + " ( removed "
                + actual.toExternalForm()
                + " from cache");
            val[i] = newVal.toExternalForm();
          } else if (hdr.equalsIgnoreCase("Set-Cookie")) {
            val[i] = parseCookie(val[i]);
          }
          if (log.isDebugEnabled())
            log.debug("Adding header " + hdr + " = " + val[i]);
View Full Code Here

        String newPath = null;
        try {
            if (base != null) {
                if (pathURL != null) {
                    //newPath = "/replacementProxyEngine?" + LaunchSession.LONG_LAUNCH_ID + "=" + requestProcessor.getLaunchId() + "&sslex_url=" + Util.urlEncode(Utils.htmlunescape(pathURL.toExternalForm())) + ref;
                  newPath = "/replacementProxyEngine/" + requestProcessor.getLaunchId() + "/" + Util.urlEncode(Utils.htmlunescape(pathURL.toExternalForm())) + ref;
                } else {
                    // Relative so we need to prepend the base
                    if (path.startsWith("./")) {
                        path = path.substring(2);
                    }
View Full Code Here

                    }
                    try {
                        URL baseURL = new URL(base);
                        URL actual = new URL(baseURL, path);
                        //newPath = "/replacementProxyEngine?" + LaunchSession.LONG_LAUNCH_ID + "=" + requestProcessor.getLaunchId() + "&sslex_url=" + Util.urlEncode(Utils.htmlunescape(actual.toExternalForm())) + ref;
                        newPath = "/replacementProxyEngine/" + requestProcessor.getLaunchId() + "/" + Util.urlEncode(Utils.htmlunescape(actual.toExternalForm())) + ref;
                    } catch (MalformedURLException murle) {
                        log.error("Invalidate base URL.", murle);
                    }
                }
            } else {
View Full Code Here

                    }
                }
            } else {
                URL actual = new URL(context, path);
                //newPath = "/replacementProxyEngine?" + LaunchSession.LONG_LAUNCH_ID + "=" + requestProcessor.getLaunchId() + "&sslex_url=" + Util.urlEncode(Utils.htmlunescape(actual.toExternalForm())) + ref;
                newPath = "/replacementProxyEngine/" + requestProcessor.getLaunchId() + "/" + Util.urlEncode(Utils.htmlunescape(actual.toExternalForm())) + ref;
            }
        } catch (MalformedURLException ex) {
            log.error("Could not convert path from '" + path + "' using " + context.toExternalForm(), ex);
            newPath = path;
        }
View Full Code Here

TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.