<p>(Eclipse 3.4, Ganymede)</p>

<p>I have an existing Dynamic Web Application project in Eclipse. When I created the project, I specified 'Default configuration for Apache Tomcat v6' under the 'Configuration' drop down.</p>

<p>It's a month or 2 down the line, and I would now like to change the configuration to Tomcat 'v5.5'. (This will be the version of Tomcat on the production server.)</p>

<p>I have tried the following steps (without success):</p>

<ul>
<li>I selected <code>Targeted Runtimes</code> under the Project <code>Properties</code><br>
The <code>Tomcat v5.5</code> option was disabled and The UI displayed this message:<br>
<code>If the runtime you want to select is not displayed or is disabled you may need to uninstall one or more of the currently installed project facets.</code>  </li>
<li>I then clicked on the <code>Uninstall Facets...</code> link.<br>
Under the <code>Runtimes</code> tab, only <code>Tomcat 6</code> displayed.<br>
For <code>Dynamic Web Module</code>, I selected version <code>2.4</code> in place of <code>2.5</code>.<br>
Under the <code>Runtimes</code> tab, <code>Tomcat 5.5</code> now displayed.<br>
However, the UI now displayed this message:<br>
<code>Cannot change version of project facet Dynamic Web Module to 2.4.</code><br>
The <code>Finish</code> button was disabled - so I reached a dead-end.</li>
</ul>

<p>I CAN successfully create a NEW Project with a Tomcat v5.5 configuration. For some reason, though, it will not let me downgrade' an existing Project.</p>

<p>As a work-around, I created a new Project and copied the source files from the old Project. Nonetheless, the work-around was fairly painful and somewhat clumsy.</p>

<p>Can anyone explain how I can 'downgrade' the Project configuration from 'Tomcat 6' to 'Tomcat 5'? Or perhaps shed some light on why this happened?</p>

<p>Thanks<br>
Pete</p>

[{'answer_id': 76205, 'author': 'William', 'author_id': 9193, 'author_profile': 'https://Stackoverflow.com/users/9193', 'pm_score': 7, 'selected': True, 'text': '<p>This is kind of hacking eclipse and you can get into trouble doing this but this should work:</p>\n\n<p>Open the navigator view and find that there is a .settings folder under your project expand it and then open the file: <code>org.eclipse.wst.common.project.facet.core.xml</code> you should see a line that says: \n<code>\n    &lt;installed facet="jst.web" version="2.5"/&gt;\n</code>\nChange that to 2.4 and save.</p>\n\n<p>Just make sure that your project isn\'t using anything specific for 2.5 and you should be good.</p>\n\n<p>Also check your web.xml has the correct configuration:</p>\n\n<pre><code>&lt;web-app version="2.4" \n        xmlns="http://java.sun.com/xml/ns/j2ee" \n        xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" \n        xsi:schemaLocation="http://java.sun.com/xml/ns/j2ee http://java.sun.com/xml/ns/j2ee/web-app_2_4.xsd"&gt;\n</code></pre>\n'}, {'answer_id': 78299, 'author': 'William', 'author_id': 9193, 'author_profile': 'https://Stackoverflow.com/users/9193', 'pm_score': 0, 'selected': False, 'text': "<p>Sorry it seems I can't post a comment without enough Rep so...</p>\n\n<p>I think it's too difficult for eclipse to degrade safely to a lower standard because it can't really know if you've used something from the newer web standard. So if it just allows you do to that it could cause your program to fail on an older version.</p>\n\n<p>You can always be backward compatible but not forwards compatible.</p>\n"}, {'answer_id': 2356592, 'author': 'Venkat', 'author_id': 194565, 'author_profile': 'https://Stackoverflow.com/users/194565', 'pm_score': 3, 'selected': False, 'text': '<p>This may be old but I tried and found the following in eclipse Galilio. </p>\n\n<p>Open the navigator view and find that there is a .settings folder under your project expand it and then open the file: org.eclipse.wst.common.project.facet.core.Delete the content of this file and right click on the project and click on properties. Go to Project Facats in the popup window there you can click on runtime tabs and convert your project to the new facet you want.</p>\n'}, {'answer_id': 4051477, 'author': 'xgomez', 'author_id': 59067, 'author_profile': 'https://Stackoverflow.com/users/59067', 'pm_score': 0, 'selected': False, 'text': "<p>You can try to uncheck the facet, apply, change the value of the facet and check. It works for me in Eclipse Helios SR1.</p>\n\n<p>So the main difference is that I do it with 'Dynamic Web Module'.</p>\n\n<p>I hope it works for you too.</p>\n"}, {'answer_id': 4830219, 'author': 'Karthik', 'author_id': 594073, 'author_profile': 'https://Stackoverflow.com/users/594073', 'pm_score': 3, 'selected': False, 'text': '<p>if you are using Maven, then shutdown eclipse, then type <code>&gt;mvn eclipse:eclipse -Dwtpversion=2.0</code>, and restart the eclipse. </p>\n'}, {'answer_id': 5571788, 'author': 'sarabrab', 'author_id': 695500, 'author_profile': 'https://Stackoverflow.com/users/695500', 'pm_score': 0, 'selected': False, 'text': '<p>I saw the same thing, then I changed the web-app version value in the <code>web.xml</code>. Doing so could fix this for you.</p>\n'}, {'answer_id': 5956380, 'author': 'Dante', 'author_id': 682844, 'author_profile': 'https://Stackoverflow.com/users/682844', 'pm_score': -1, 'selected': False, 'text': '<p>If you are using maven you can generated the eclipse settings using the maven eclipse plugin. </p>\n\n<p>For the jst.web version the Maven eclipse pluging takes into account the dependencies of the project. If you have a servlet api dependency defined :</p>\n\n<pre><code>&lt;dependency&gt;\n    &lt;groupId&gt;org.apache.tomcat&lt;/groupId&gt;\n    &lt;artifactId&gt;servlet-api&lt;/artifactId&gt;\n    &lt;version&gt;6.0.32&lt;/version&gt;\n&lt;/dependency&gt; \n</code></pre>\n\n<p>You jst.web parameter will be 6.0 </p>\n\n<pre><code>&lt;faceted-project&gt;\n  ...\n  &lt;installed facet="jst.web" version="6.0"/&gt;\n  ...\n&lt;/faceted-project&gt;\n</code></pre>\n'}]
['https://Stackoverflow.com/questions/75786', 'https://Stackoverflow.com', 'https://Stackoverflow.com/users/13360/']