title: Creating WAR using Netbeans
body: <p>I am creating war file from Netbeans. Previously I created jar file using Netbeans, it worked fine (in command prompt). But when I am running war file from command prompt, I am getting this error:</p>
  
  <pre><code>Failed to load Main-Class manifest attribute from WebApplication2.war.
  </code></pre>
  
  <p>I have set main class from Netbeans during creation of jar</p>
  
  <pre><code>Project-&gt;properties-&gt;Run-&gt;Choosed main class)..
  </code></pre>
  
  <p>Do I have to set any mainclass during war creation (as web application does not have any main class, it just has JWS and servlets, how can we set main class)?</p>