javaeclipseruntimetomcat6

Unable to associate project with a runtime server in eclipse IDE


enter image description hereI had created a dynamic web project. AS of now it has a jsp file which am trying to run. When I tried to associate the project with a specific runtime(tomcat 6.0), it is not happening.

I right clicked on the project/properties/Targeted Runtimes. It doesn't show any runtimes(I have added tomcat 6.0 in servers). When I click the checkbox 'Show all runtimes', everything comes in disabled mode.

What could be the problem ?

Attached screenshot of the problem.

Update: I even tried to create a new runtime and associate it with the project( project/properties/Targeted Runtimes/new). Even the newly created runtime is getting disabled and am unable to associate it with the project.


Solution

  • To add a project to a runtime you must have a match between your project and your runtime; you have to check:

    Once you've validated the match between your project and the runtime, you need the project to target the runtime, as follows:

    1. Open the project in Package Explorer, Project Explorer, or Navigator.
    2. Right-click on the project, and select "Properties".
    3. Click on "Targeted Runtimes" in the properties window.
    4. Select the checkbox of the validated runtime that is to be targeted.
    5. Confirm by clicking "OK".

    The new runtime will be associated with that project. If a runtime that you want to select is not displayed or is disabled, you may need to uninstall one or more of the currently installed project facets. This can be done within the same Properties dialogue.