title: Access COM Port on Client Side in Web Programming Java
body: <p>I am developing a Web page using jsp and html where in I need to read/write from/to a Device connected on Client's System who are accessing the Webpage. The Device is a Serial Device which is connected as COM1(Eg) in Windows. I went through different options available. I found <a href="http://code.google.com/p/java-simple-serial-connector/wiki/jSSC_Terminal" rel="nofollow">this</a> which serves my purpose. I started learning JNLP for the same. I imported the project and made changes according to my needs. (This project is using jssc.jar). I generated the jar (jSSC-Terminal.jar) and signed with self-generated key. The GUI is being loaded properly but I am unable to access the Serial port on client's machine. Here is my jnlp file launch.jnlp</p>
  
  <pre><code>   &lt;?xml version="1.0" encoding="UTF-8" standalone="no"?&gt;
  &lt;jnlp href="launch.jnlp" spec="1.0+"   codebase="http://192.168.1.33:8080/abc" 
      href="launch.jnlp"&gt;
      &lt;information&gt;
          &lt;title&gt;jSSC-Terminal&lt;/title&gt;
          &lt;vendor&gt;scream3r&lt;/vendor&gt;
          &lt;homepage href="scream3r.org"/&gt;
          &lt;description&gt;jSSC-Terminal&lt;/description&gt;
          &lt;description kind="short"&gt;jSSC-Terminal&lt;/description&gt;
  
      &lt;/information&gt;
  &lt;update check="background"/&gt;
  &lt;security&gt;
  &lt;all-permissions/&gt;
  &lt;/security&gt;
      &lt;resources&gt;
  &lt;j2se version="1.5+"/&gt;
  &lt;jar href="jSSC-Terminal.jar" main="true"/&gt;
  
  &lt;jar href="jssc.jar" download="eager"/&gt;
  
  
  
  &lt;/resources&gt;
      &lt;applet-desc height="500" main-class="applet.Main" name="Main" width="700"&gt;
  
      &lt;param name="separate_jvm" value="true"/&gt;
  &lt;param name="draggable" value="true"/&gt;
  &lt;/applet-desc&gt;
  &lt;/jnlp&gt;
  </code></pre>
  
  <p>Here is my html </p>
  
  <pre><code>&lt;!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"&gt;
  &lt;html&gt;
    &lt;head&gt;
            &lt;title&gt;jSSC-Terminal&lt;/title&gt;
              &lt;style type="text/css"&gt;
                body {
                  margin-left: 10px;
                  margin-top: 10px;
                  margin-right: 10px;
                  margin-bottom: 10px;
                }
          &lt;/style&gt;
          &lt;/head&gt;
    &lt;body&gt;
    &lt;applet code="applet.Main" archive="http://192.168.1.33:8080/abc/jSSC-Terminal.jar, http://192.168.1.33:8080/amar/lib/jssc.jar" width="700" height="500"&gt;
        &lt;param name="separate_jvm" value="true"/&gt;
        &lt;param name="draggable" value="true"/&gt;
            &lt;/applet&gt;
          &lt;/body&gt;
  &lt;/html&gt;
  </code></pre>
  
  <p>I have placed all these files in Tomcat directory as below</p>
  
  <pre><code>/Tomcat/webapps/abc/launch.jnlp
  /Tomcat/webapps/abc/jSSC-Terminal.jar
  /Tomcat/webapps/abc/index.html
  /Tomcat/webapps/abc/lib/jssc.jar
  </code></pre>
  
  <p>I am unable to get the SerialPort List when run as jnlp. Kindly help me out with a fix if available. Or are there any alternate things available in JSP. Thanks and Regards.</p>
  
  <p><strong>Edit</strong> :</p>
  
  <p>Finally found out thank you. I replaced my applet tag and included jnlp location as below : </p>
  
  <pre><code>&lt;applet code="applet.Main" archive="http://192.168.1.33:8080/abc/jSSC-Terminal.jar,    http://192.168.1.33:8080/abc/lib/jssc.jar,"http://192.168.1.33:8080/abc/test.jnlp" width="700" height="500"&gt;
        &lt;param name="separate_jvm" value="true"/&gt;
        &lt;param name="draggable" value="true"/&gt;
            &lt;/applet&gt;
          &lt;/body&gt;
  </code></pre>