필자는 filewriting을 위해 서버에 연결하고있는 애플릿을 가지고 있습니다. localhost를 사용하여 서버에 연결하려고하면 : 내 컴퓨터에서 작동하지만 (서버가 동일한 컴퓨터에 있음) 작동하지 않습니다. 다른 기계. 내가 IP 주소로 할 때애플릿 액세스 제어 문제
그것은 더 작동없는 경우
내 애플릿 코드 :
public class dynamicTreeApplet extends JPrefuseApplet {
private static final long serialVersionUID = 1L;
public static int i = 1;
public String dieasenameencode;
public void init() {
System.out.println("the value of i is " + i);
URL url = null;
//Here dieasesname is important to make the page refresh happen
//String dencode = dieasenameencode.trim();
try {
//String dieasename = URLEncoder.encode(dencode, "UTF-8");
// i want this piece of the code to be called
url = new URL("http://localhost:8080/docRuleTool/appletRefreshAction.do?dieasename=");
URLConnection con = url.openConnection();
con.setDoOutput(true);
con.setDoInput(true);
con.setUseCaches(false);
InputStream ois = con.getInputStream();
this.setContentPane(dynamicView.demo(ois, "name"));
ois.close();
} catch (MalformedURLException e) {
e.printStackTrace();
} catch (FileNotFoundException f) {
f.printStackTrace();
} catch (IOException io) {
io.printStackTrace();
}
++i;
}
}
자바 정책 파일 :
grant {
permission java.net.SocketPermission "*", "accept";
permission java.net.SocketPermission "*", "connect";
};
내 항아리에 서명하고 난 그들을 원하는이 donot되지 않습니다 유지의 관점에서 서명되어야한다.
내 질문에 아무런 의미가 없습니다 – bhalkian
30 분 이내에 질문에 대한 답변을 얻지 못할 경우 걱정하지 마십시오. –