Apr
2
Tweaking FacesIDE Eclipse Plugin for Easier JSF Development with Tomcat
Thu, 04/02/2009 - 09:35
FacesIDE plugin comes in very handy when you need to develop JSF applications.
However, when put into work, there are two changes you need to make by hand to the
This blog shows how to tweak the plugin so you don't need to make those changes manually every time you create a new JSF project.
- Open your eclipse's plugins directory (In my installation eclipse is installed directly under c:\ so the plugins directory is c:\eclipse\plugins).
Find FacesIDE plugin's directory - c:\eclipse\plugins\tk.eclipse.plugin.jsf_2.0.2\myfaces-1.1.3\conf (the version number might change depending on the version of the plugin you have installed). - Find web.xml and open it in an editor.
- Towards the end of the file you will find the following section:
<!-- virtual path mapping --> <!-- <servlet-mapping> <servlet-name>Faces Servlet</servlet-name> <url-pattern>/faces/*</url-pattern> </servlet-mapping> -->The virtual path mapping allows for the JSF Servlet to grab all requests for JSF pages.
Remove the comment surrounding the servlet-mapping tag and save the file. You will no longer have to do it manually for every JSF project you create.
- There's one more thing you can do in this file, so you won't have to change the filter attribute manually for Tomcat.
Find the section starting with :
<!-- Extensions Filter -->
In the filter-class tag, change the original content of org.apache.myfaces.component.html.util.ExtensionsFilter to read org.apache.myfaces.webapp.filter.ExtensionsFilter
Don't forget to save the file.
That's it. The next JSF project you create using this plugin will have those two changes ready out-of-the-box for you, and save you some work.
Explanation:
The FacesIDE plugin creates a file structure for a JSF application inside your eclipse project. One of the files that the plugin creates is the web.xml file.
What you did just now changes the original web.xml file used by the plugin, and so, the next time the plugin is used, the altered version will be used.
- admin's blog
- Login or register to post comments