Warning: file_get_contents(/data/phpspider/zhask/data//catemap/9/java/363.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Java HTTP Url连接Est。但不开放_Java_Http_Jsf_Url_Httpconnection - Fatal编程技术网

Java HTTP Url连接Est。但不开放

Java HTTP Url连接Est。但不开放,java,http,jsf,url,httpconnection,Java,Http,Jsf,Url,Httpconnection,我已连接到一个URL 使用此代码: public void ExecURL() { try { URL myURL = new URL("http://helpdesk.wi-tribe.net.pk:8080/secure/CreateIssueDetails!init.jspa?pid="+projID+"&issuetype="+issueID+"&"+customerField+"="+searchID+"&customfield_1001

我已连接到一个URL

使用此代码:

public void ExecURL()
{
    try {
        URL myURL = new URL("http://helpdesk.wi-tribe.net.pk:8080/secure/CreateIssueDetails!init.jspa?pid="+projID+"&issuetype="+issueID+"&"+customerField+"="+searchID+"&customfield_10014="+searchMAC+"&customfield_10016="+custMobile+"&reporter="+emailID);
        URLConnection myURLConnection = myURL.openConnection();
        myURLConnection.connect();
        System.out.println("connection est: " + myURL.toString() );
    } 
    catch (MalformedURLException e) { 
        // new URL() failed
        // ...
    } catch (IOException e) {   
        // openConnection() failed
        // ...
    }
}
我通过以下方式呼叫此连接:

现在,我知道已经建立了连接,但我的目标是在Mozilla或Chrome的新窗口中打开此URL,使用。

无论action方法返回什么字符串,commandLink标记都将用作导航目标。如果操作方法返回null或void,将重新加载当前页面

因此,为了让JSF转到ExecURL中内置的URL,您需要返回它。代码需要如下所示:

public String ExecURL() {
    return "http://helpdesk.wi-tribe.net.pk:8080/secure/CreateIssueDetails!init.jspa?pid=" + projID + "&issuetype=" + issueID + "&" + customerField + "=" + searchID + "&customfield_10014=" + searchMAC + "&customfield_10016=" + custMobile + "&reporter=" + emailID;
}

我仍然无法找到URL。单击呈现的链接后会发生什么?