<filter> <filter-name>HelloWorld</filter-name> <filter-class>chapter07.HelloWorldFilter</filter-class> </filter> <filter-mapping> <filter-name>HelloWorld</filter-name> <url-pattern>/filter/*</url-pattern> </filter-mapping>Any request that matches the pattern /filter/* - for example, /chapter07/filter/hello - invokes the HelloWorldFilter.
<filter> <filter-name>TextToHTML</filter-name> <filter-class>chapter07.TextToHTMLFilter</filter-class> </filter> <filter-mapping> <filter-name>TextToHTML</filter-name> <url-pattern>*.txt</url-pattern> </filter-mapping>Therefore, all the text files are sent with a background image. You can view a sample text file at /chapter07/ReportJanFeb.txt