gpt4 book ai didi

java.net.MalformedURLException : no protocol:

转载 作者:太空宇宙 更新时间:2023-11-04 07:52:03 27 4
gpt4 key购买 nike

如果 url 路径中有 http,为什么我得不到协议(protocol)?

日志:

network: Connecting http://xxx.ccc.local/upload/up.php?aa=0&bb=Ap%F3lice+de+Seguro&cc=1028&from=documentos with cookie "CLinkLanguage=en; __utma=232844939.1396040569.1356709687.1357294077.1357902500.12; __utmz=232844939.1356709687.1.1.utmcsr=(direct)|utmccn=(direct)|utmcmd=(none); __utmb=232844939.24.10.1357902500; symfony=e0lpbkrcu0bidkpiujd1if4pt4; __utmc=232844939; CLinkLanguage=en; PHPSESSID=uv31kr1vpojvqgnc9ae9nda921"

异常(exception):

    java.net.MalformedURLException: no protocol: 
at java.net.URL.<init>(Unknown Source)
at java.net.URL.<init>(Unknown Source)
at java.net.URL.<init>(Unknown Source)

html

 <APPLET  CODE = "wjhk.jupload.JUploadApplet" ARCHIVE = "upload/wjhk.jupload.jar" WIDTH = "600" HEIGHT = "400" MAYSCRIPT></XMP>
<PARAM NAME = CODE VALUE = "wjhk.jupload.JUploadApplet" >
<PARAM NAME = ARCHIVE VALUE = "upload/wjhk.jupload.jar" >
<PARAM NAME = "type" VALUE="application/x-java-applet;version=1.4">
<PARAM NAME = "scriptable" VALUE="false">
<PARAM NAME = "postURL" VALUE ="{$url}">
<PARAM NAME = "anexosID" VALUE ="{$anexosID}">
<PARAM NAME = "subanexosID" VALUE ="{$IdConsulta}">
<PARAM NAME = "companyID" VALUE ="{$companyID}">
<PARAM NAME = "resultURL" VALUE ="{$resultUrl}">
<param name="debug" value="true">


Java 1.4 or higher plugin required.

<APPLET  CODE = "wjhk.jupload.JUploadApplet" ARCHIVE = "upload/wjhk.jupload.jar" WIDTH = "600" HEIGHT = "400" MAYSCRIPT></XMP>
<PARAM NAME = CODE VALUE = "wjhk.jupload.JUploadApplet" >
<PARAM NAME = ARCHIVE VALUE = "upload/wjhk.jupload.jar" >
<PARAM NAME = "type" VALUE="application/x-java-applet;version=1.4">
<PARAM NAME = "scriptable" VALUE="false">
<PARAM NAME = "postURL" VALUE ="http://xxx.ccc.local/upload/up.php?aa=0&bb=Alvar%E1%2Ffg&cc=1028&from=documentos">
<PARAM NAME = "anexosID" VALUE ="">
<PARAM NAME = "subanexosID" VALUE ="">
<PARAM NAME = "companyID" VALUE ="">
<PARAM NAME = "resultURL" VALUE ="">
<param name="debug" value="true">


Java 1.4 or higher plugin required.
</APPLET>

最佳答案

postURL参数的值是一个可以正常解析的URL,因此问题出在其他地方。你可以做什么:

  • 尝试各种小程序参数
  • 请求小程序开发人员的支持
  • 如果您没有该小程序的源代码,您仍然可以对其进行反编译,并了解其工作原理:Where can I find a Java decompiler?

以下程序仅显示 postURL 值对于 Java 来说是可以的:

public class A {
public static void main(String[] args) throws MalformedURLException {
String s = "http://xxx.ccc.local/upload/up.php?aa=0&bb=Alvar%E1%2Ffg&cc=1028&from=documentos";

URL url = new URL(s);
String protocol = url.getProtocol();
System.out.println(String.format("A::main: protocol = '%s'", protocol));
}
}

关于java.net.MalformedURLException : no protocol:,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/14278320/

27 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com