我在JSF 2中开发了website但是,如果我尝试在Google Chrome中执行相同的操作,一页“展厅”会在Internet Explorer中出现例外情况。 我不能多说这个例外因为我真的对此一无所知。 这就是我向你们展示的内容。
当我点击'Lâmpada'(英文意思是指示灯)时会发生异常。 在这里,您可以远程打开/关闭灯泡。正如我说的一切正常,整个网站,即使在IE浏览器。只是页面'陈列室'给出了这个错误。
修改
我的showroom.xhtml
页面:
<h:form id="form_supervisory">
<h:panelGrid columns="1">
<p>
<APPLET CODE="YawApplet.class" ARCHIVE="YawApplet.jar" CODEBASE="http://valterhenrique.dyndns.info:8081/" WIDTH="645" HEIGHT="485">
<param name="Host" value="valterhenrique.dyndns.info" />
<param name="Port" value="8081" />
<param name="Zoom" value="true" />
</APPLET>
</p>
<h:commandButton value="Lâmpada" action="#{supervisoryc.light}" styleClass="button-5" >
<f:ajax execute="@form" render="@none" />
</h:commandButton>
</h:panelGrid>
</h:form>
小程序仅用于流式传输我的网络摄像头,我使用Yawcam。
豆子:
@ManagedBean(name="supervisoryc")
@SessionScoped
public class SupervisoryControl implements Serializable {
private static final long serialVersionUID = -2313043518176548344L;
public void light(){
Client client = new Client();
client.send("valterhenrique.dyndns.info", "lamp");
}
}
socket
类:
public class Client {
public void send(String ip, String message){
Socket s = null;
PrintStream ps = null;
try{
s = new Socket(ip, 7000);
ps = new PrintStream(s.getOutputStream());
ps.println(message);
}catch(IOException ioe){
throw new RuntimeException(ioe.getMessage());
}finally{
try{
s.close();
}catch(IOException e){}
}
}
}
这就是我应用程序所需要的全部工作。 知道为什么会这样吗?