1

I am working on hipster i have to add a new filter in my project but their is not web.xml file is avalible in project so where i am add filter with mapping.

this is filter:

<filter>
    <filter-name>UrlRewriteFilter</filter-name>
    <filter-class>org.tuckey.web.filters.urlrewrite.UrlRewriteFilter</filter-class>
</filter>
<filter-mapping>
    <filter-name>UrlRewriteFilter</filter-name>
    <url-pattern>/*</url-pattern>
    <dispatcher>REQUEST</dispatcher>
    <dispatcher>FORWARD</dispatcher>
</filter-mapping>

Please help me.

Thanks in advance.

Charnjeet Singh
  • 3,056
  • 6
  • 35
  • 65

1 Answers1

1

We don't use a web.xml configuration on JHipster, we use the new Java Configuration for this.

Have a look at the generated "WebConfigurer" class to have examples of configured filters, for example the GZip filter.

Julien Dubois
  • 3,678
  • 1
  • 20
  • 22
  • Any examples I can follow like the examples from these tuckey rules? https://github.com/bdunklau/LittleBlueBird/wiki/URL-Rewriting-and-HTML5-in-AngularJS – Jack Shultz Jun 17 '14 at 02:40
  • Hi Julian, without web.xml, how can web-containers recognize and start the application? – DhafirNz Nov 06 '15 at 03:27