Q: I've installed Tomcat x.y on my machine, set it up in Tools > Servers so now I have two servers listed, Glassfish and Tomcat. I can go to the "services" tab > Servers, right click on Tomcat and start it and stop it just fine. But when I go into my project properties dialog's run category panel and check the servers dropdown I only see Glassfish...I'm unable to set it to Tomcat because it doesn't appear in the dropdown.

A:  The most likely reason is that the project is of 'Java EE 5' version. (For instance, Tomcat 5.5 supports only J2EE 1.4; it will not be available for selection for a Java EE 5 project).

While creating a new project via 'File | New Project | Web | Web Application ' , the 'Name and Location' panel has a combobox for 'Java EE' version. If 'Java EE 5' is the selected version, then only those servers that support Java EE 5 (like GlassFish V2) will be listed in the 'Server' combobox. But if the value is changed to 'J2EE 1.4' , then tomcat 5.5 should also appear in the 'Server' combobox and can be selected as the target server for the project.

A project's Java EE version can only be set while creating a project and cannot be changed later; of course, the target server for a project can be changed anytime later (using the 'Run' category panel in the project properties dialog), but only the installed servers that support the Java EE version of the project will be presented for selection.

Comments:

Post a Comment:
  • HTML Syntax: NOT allowed

This blog copyright 2009 by radhika