Imagine you are developing a web application, which displays some JSP files. It is pretty annoying to have to re-deploy the application whenever you make any change to a JSP to see the result in the browser (there are other ways to get rid of that annoying problem, of course; here I’m describing only one way of many). It would be really handy if the JSP files were read from outside the .war – most preferably, from the directory in which you develop your web application.
This is where the resources filter may help you. This filter reads JSP files (and other resources) from a specified directory in the file system, instead of reading them from the deployed application archive. Thanks to that, if you are developing web pages, you can edit them using your favorite IDE and view your changes immediately.
To use the filter, you only need to include a jar with one class and add one filter definition to your
web.xml. The filter works with JBoss AS 4.0.5 and 4.2, portlets and JSF. For more details check out:
- usage & configuration (wiki), and of course