Note that there are some explanatory texts on larger screens.

plurals
  1. POReading client COMPORT from Java applet
    primarykey
    data
    text
    <p>I need to read client comport accessing my JSP based web application.</p> <pre><code>&lt;html&gt; &lt;head&gt; &lt;meta http-equiv="Content-Type" content="text/html; charset=UTF-8"&gt; &lt;title&gt;COMPORT&lt;/title&gt; &lt;/head&gt; &lt;body bgcolor="blue"&gt; &lt;h1&gt;ACCESSING COMPORT&lt;/h1&gt; &lt;jsp:plugin align="middle" height="500" width="500" type="applet" archive="" code="SunCommSerialPort.class" name="clock" codebase="."/&gt; &lt;/body&gt; &lt;/html&gt; </code></pre> <p>This is my Java applet code to read COM port.</p> <pre><code>import java.util.Enumeration; import javax.comm.CommPortIdentifier; /** @author Venugopal */ public class COMPORT { /** @param args the command line arguments */ public static void main(String[] args) { COMPORT CM = new COMPORT(); String StrCommPort = CM.GetSerialPort(); System.out.println("StrCommPort " + StrCommPort); } public String GetSerialPort() { String Serialport = ""; Enumeration portList = CommPortIdentifier.getPortIdentifiers(); while (portList.hasMoreElements()) { CommPortIdentifier portId = (CommPortIdentifier) portList.nextElement(); if (portId.getPortType() == CommPortIdentifier.PORT_SERIAL) { Serialport = Serialport + portId.getName() + "//"; } else { // ////////////System.out.println(portId.getName()); } } if(Serialport !=null &amp;&amp; Serialport.length() &gt;0){ Serialport = Serialport.substring(0, Serialport.length() - 2); } return Serialport; } } </code></pre> <p>Please tell us what to do.I have kept all necessary files at correct place. The Java code I have kept here was working after that I have modified extending applet and removing PSVM with <code>init()</code> method.</p>
    singulars
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload