Eclipse with Tomcat
I am going to use Eclipse for development. Because I am also going to use Flex I installed Flex Builder 3 which is actually a version of Eclipse pre-configure by Adobe to contain Flex. I try to update Flex Builder with the necessary plugins, and also connect it to Tomcat. This is quite difficult task as I found while searching for help on the internet. The common advise I found to avoid complications is to have installed Flex Builder, and also Eclipse. So, I have both of them.
To install Eclipse is a fact to go to the Eclipse website and choose the package you want to install and follow the instructions.
To use Tomcat as a web server for the projects created with Eclipse I follow the instruction found this article: Eclipse WTP and Tomcat Tutorial. This article includes a link to a explanatory screencast. Eclipse IDE can start, reload, and stop Tomcat, and the projects become web application spaces automatically. It also allows to create ‘WAR’ files in order to deploy the application in another server.
Following the article instruction I found some problems. The first one was related to a message which Tomcat was displaying while starting. The message is: INFO: The Apache Tomcat Native library which allows optimal performance in production environments was not found on the java.library.path. The article OSX: The Apache Tomcat Native library… was not found on the java.library.path help me to solve this problem.
The next problem was related to Tomcat and the context properties. I solve this with the indications found in this article: WARNING: [SetPropertiesRule]{Server/Service/Engine/Host/Context} Setting property
Another problem was related to the code in the example servlet ‘HelloWorld’. The tutorial will use this line of code:
PrintWriter writer = response.getWriter();
This will display the error: ‘PrintWriter cannot be resolved to a type’. This is solved by adding this code in the ‘import’ part of the file:
import java.io.PrintWriter;
I have Eclipse now using tomcat.