debug JSF apps in Eclipse

Topic: general|

I have been using Eclipse as my IDE and Tomcat as the servlet container for my previous web development. I used the Sysdeo Tomcat plugin to debug servlets/JSP in Eclipse IDE. I had no problems with it, that is till yesterday…
I am currently evaluating JavaServer Faces (JSF) as a server-side framework for a new web app project and am building a little prototype app with it. The first thing I was wanting to make sure was I could debug JSF apps using the Sysdeo plugin. I quickly found out that I could not.
JSF apps require a ‘faces-config.xml’ file that must be at the WEB-INF level (sibling of the ‘classes’ directory) and the Sysdeo-Tomcat wiring was not picking up this file…and was not even able to initialise the Faces Servlet.
I was quite frustrated…and quickly got dabNADD :-)
I googled for a solution to this problem but didnt get far. Then as I was browsing thru the docs of MyEclipse IDE (I use it for all the editors it provides) to check some issues with the JSF project settings, I found that it has a Tomcat connector!
I quickly configured it and ran my JSF app within the Debug Perspective…and voila it breakpointed! It did not complain or stutter with the JSF config files and works like a charm. The Tomcat connector also has its own deploy utility which needed some meddling for JSF apps…I didnt go there; just used my Ant build.xml for the deploy.
Even though MyEclipse IDE costs $29.95/yr (Sysdeo is free), I highly recommend it for your Eclipse IDE not only for its seamless connection with Tomcat, but for its numerous editors and wizards.


 

 


Leave a Reply