views:

322

answers:

0

Hi! I have a groovy project running under jetty for development and under tomcat for production. I wrote a filter called URLFilter

I've added the following lines in web.xml (actually I've added to myProj/src/templates/war/web.xml)

<filter>
    <filter-name>URLAbarajeitor</filter-name>
    <filter-class>filters.URLFilter</filter-class>
</filter>
<filter-mapping>
<filter-name>URLFilter</filter-name>
<url-pattern>/*</url-pattern>
</filter-mapping>

I've developed the filter as a separated Java Project. I've copied the compiled classes to

myProj/web-app/WEB-INF/classes/filters/

when I run the command

mvn grails:war

a war file is generated but when I open it the filter is not there (the whole directory has not been copied). The web.xml under WEB-INF contains the code from above and when jetty starts (using grails run-app) throws an exception (ClassNotFoundException) due to the missing classes. The same happens when i try:

grails run-app

Where should I put the classes so that jetty will find it and pack inside the war file?

Thanks in advance!