wrschneider
wrschneider

Reputation: 18770

Include more than one filter from existing JAR into a Grails project

I have a Grails project and want to add existing filters from a JAR file.

I used the WebXmlConfig plugin, mentioned in this answer:

How to add filters to a Grails app

and that worked great for a single filter, but I can't figure out how to extend that to more than one filter.

Do I need to change approach and edit the web.xml template directly?

Upvotes: 0

Views: 66

Answers (1)

Burt Beckwith
Burt Beckwith

Reputation: 75671

I'd use the pluginator plugin and put the definitions in doWithWebDescriptor just like you would in a plugin - you can add as many elements as you want. It's a slick plugin that lets apps do things that are generally only supported in plugins, like conveniently editing web.xml (although with a seriously weird DSL) and registering custom artifact types.

Upvotes: 1

Related Questions