title: java.awt.HeadlessException showing Swing Application
body: <p>I have 2 applications. One is web app. another is Java standalone app.  Here I am calling Java app. through Servlet app. In stand alone app., I am using <code>JFrame</code>, <code>JPanel</code> etc. like Swing, AWT API. Here I am getting:</p>
  
  <pre><code>java.awt.HeadlessException
  at java.awt.GraphicsEnvironment.checkHeadless(GraphicsEnvironment.java:159)
  at java.awt.Window.&lt;init&gt;(Window.java:432)
  at java.awt.Frame.&lt;init&gt;(Frame.java:403)
  at java.awt.Frame.&lt;init&gt;(Frame.java:368)
  at javax.swing.JFrame.&lt;init&gt;(JFrame.java:158)
  </code></pre>
  
  <p>For this I have set in Servlet app. is:</p>
  
  <pre><code>  System.setProperty("java.awt.headless", "false");
  </code></pre>
  
  <p>But Still I am getting same Issue. I am Glassfish Server. Can you guys please suggest me what I have to do?</p>