eclipsetomcattomcat6tomcat5.5ganymede

Eclipse - How can I change a 'Project Facet' from Tomcat 6 to Tomcat 5.5?


(Eclipse 3.4, Ganymede)

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.

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.)

I have tried the following steps (without success):

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.

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.

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?

Thanks
Pete


Solution

  • This is kind of hacking eclipse and you can get into trouble doing this but this should work:

    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.xml you should see a line that says: <installed facet="jst.web" version="2.5"/> Change that to 2.4 and save.

    Just make sure that your project isn't using anything specific for 2.5 and you should be good.

    Also check your web.xml has the correct configuration:

    <web-app version="2.4" 
            xmlns="http://java.sun.com/xml/ns/j2ee" 
            xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" 
            xsi:schemaLocation="http://java.sun.com/xml/ns/j2ee http://java.sun.com/xml/ns/j2ee/web-app_2_4.xsd">