title: Tomcat 6 configuration inside Eclipse
body: <p>I am having trouble configuring my <code>Eclipse EE</code> to run Tomcat 6 (my company has not migrated to Tomcat 7 yet).  I was trying to follow <a href="http://www.coreservlets.com/Apache-Tomcat-Tutorial/eclipse.html" rel="nofollow noreferrer">these instructions</a>.  I went into the servers tab in the bottom panel, hit <code>New-&gt;Server</code>, then chose <code>Apache-&gt;Tomcat 6</code>.  Then I went through a succession of the following screens:</p>
  
  <p><img src="https://i.stack.imgur.com/FKpBp.png" alt="enter image description here">
  <img src="https://i.stack.imgur.com/ZNfKW.png" alt="enter image description here"></p>
  
  <p>and finally arrived to the error message:</p>
  
  <p><img src="https://i.stack.imgur.com/Hs8ia.png" alt="enter image description here"></p>
  
  <p>Here are the contents of my Tomcat conf dir (<code>C:\home\SFTWR\tomcat6\conf</code>):</p>
  
  <pre><code>catalina.policy
  catalina.properties
  context.xml
  logging.properties
  server.xml
  web.xml
  wrapper.properties
  </code></pre>
  
  <p>Any suggestion what may be wrong?  It runs fine when running standalone and I can deploy apps from Eclipse but I would like to be able to run in in Eclipse for debugging purposes.</p>
  
  <p><strong>UPDATE:</strong></p>
  
  <p>Despite the error message, I noticed that the server was indeed registered, however, not functional -- when I tried to hit "Start", I got an error popup listing two problems:</p>
  
  <ul>
  <li><p><strong>Publishing to localhost</strong>  (Details: <em>Cannot publish to the server because it is missing its runtime environment.)</em></p></li>
  <li><p><strong>Starting localhost</strong>  (Details:  <em>An internal error occurred during: "Starting localhost".
  java.lang.NullPointerException</em>)</p></li>
  </ul>
  
  <p>The detailed exception stack trace is as follows:</p>
  
  <pre><code>org.eclipse.core.runtime.CoreException: Could not load the Tomcat server configuration at \Servers\localhost-config. The configuration may be corrupt or incomplete.
      at org.eclipse.jst.server.tomcat.core.internal.Tomcat60Configuration.load(Tomcat60Configuration.java:313)
      at org.eclipse.jst.server.tomcat.core.internal.TomcatServer.getTomcatConfiguration(TomcatServer.java:124)
      at org.eclipse.jst.server.tomcat.core.internal.TomcatServerBehaviour.getTomcatConfiguration(TomcatServerBehaviour.java:80)
      at org.eclipse.jst.server.tomcat.core.internal.TomcatServerBehaviour.setupLaunch(TomcatServerBehaviour.java:496)
      at org.eclipse.jst.server.tomcat.core.internal.TomcatLaunchConfigurationDelegate.launch(TomcatLaunchConfigurationDelegate.java:96)
      at org.eclipse.debug.internal.core.LaunchConfiguration.launch(LaunchConfiguration.java:854)
      at org.eclipse.debug.internal.core.LaunchConfiguration.launch(LaunchConfiguration.java:703)
      at org.eclipse.debug.internal.core.LaunchConfiguration.launch(LaunchConfiguration.java:696)
      at org.eclipse.wst.server.core.internal.Server.startImpl2(Server.java:3402)
      at org.eclipse.wst.server.core.internal.Server.startImpl(Server.java:3340)
      at org.eclipse.wst.server.core.internal.Server$StartJob.run(Server.java:363)
      at org.eclipse.core.internal.jobs.Worker.run(Worker.java:54)
  </code></pre>