Tomcat 5.5 (6.0)
Eclipse 3.2 + WTP 1.1 (2.0)
I have struggled for a whole day to figure out whether it is possible to build my project together with Eclipse WTP and Maven like my earlier projects. The answer so far is yes, you can, but you have to be ware that you may have to compromise some of the Eclipse JSF application features (such as configuration navigation for faces-config). Besides, to minimise your trouble, you got to update your system specification.
Let me just introduce some problems that I have encounter, which may could be your future reference.
Java Build path – once you import your project into the eclipse IDE, you would found that you couldn’t use the refactor function as your default build path (src/main/recourses) has excludes all the .java files. Rather than enabling this path, I would prefer to create a new path (src/main/java) to hold all my business logic java files and leave that recourses to only hold the static files (such as .property file)
Tomcat 5.5 is too old– When you try to deploy your project onto tomcat, you could always find the following error message in your log file.
SEVERE: Error configuring application listener of class.com.sun.faces.config.GlassFishConfigureListener
You could notice that was because some of the libraries were missing (servlet-api.jar and jsp-api.jar). You could download them with maven, if you would like, but I don’t recommend. The easiest way to solve this problem is to update your Tomcat to 6.0
If you don’t have the problem to upgrade your tomcat, you’d better to do so, since Jsf1.2 employed a lot of new JSP API, which Tomcat 5.5 doesn’t support.
I really hate to use the server application with Eclipse, so I stay with maven and use the tomcat plugin to look after the deployment. If you like what I am doing, please aware that tomcat:reploy would not be good enough to correspond small changes you made on your file. (I have tried to delete all the caches, but it does not seem to work).
Although, I have update the WTP to the latest, but it seems that you still can’t fully use JSF 1.2 with Eclipse. When you create a new Dynamic web project, you got the opportunity to configure your project facets. However, there is no way you could tick the Jsf 1.2 option as it requires to go with dynamic web module 2.5, which is actually not an option in the current version Eclipse WTP!!!
I really fancy the configuration wizard for faces-config.xml. I have tried quite long time to make the project loaded from maven could keep this features, but I failed to do so. You can only edit it with its source code, which means you have manually to write down all those navigation configurations. If any body could figure out how to use it, please let me know.