你可以考虑这样写: String protocol = getCodeBase().getProtocol();
int port = getCodeBase().getPort();
String host = getCodeBase().getHost();
try{
URL url = new URL(protocol + "://" + host +":" + port +
"/systemservlet?command=start"); 下同你的程序
另外你的程序中,8080也没有引号呀!
int port = getCodeBase().getPort();
String host = getCodeBase().getHost();
try{
URL url = new URL(protocol + "://" + host +":" + port +
"/systemservlet?command=start"); 下同你的程序
另外你的程序中,8080也没有引号呀!
改成connect = (new URL(getCodeBase()+QueryString)).openConnection();试试
String str ="http://"+"serverName:"+Port"/Servlet/receiveservlet?message="+message;URL url = new URL(str);this.appletMe.getAppletContext().showDocument(url, "_self");