You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tomee.apache.org by "rubin@xs4all.nl" <ru...@xs4all.nl> on 2016/05/25 08:14:29 UTC

ApplicationComposer: How to test/load a javax.servlet.Filter

Hi OpenEJB/TomEE Users,

I've recently started using ApplicationComposer in our automated testing to great effect but am running into some questionmarks with regards to trying to test a javax.servlet.Filter.

Question: is it possible to load a filter in ApplicationComposer? If yes, where/how would I go about this?

Kind regards + thanks in advance,


Rubin!

Re: ApplicationComposer: How to test/load a javax.servlet.Filter

Posted by Romain Manni-Bucau <rm...@gmail.com>.
Hello Rubin

Style is not the most up to date (@RandomPort would be better) but this
test ensures filters are used:
https://github.com/apache/tomee/blob/4b9d8c9d221948547d49427077fcf68709a186bd/server/openejb-http/src/test/java/org/apache/openejb/server/httpd/FilterRegistrationTest.java

There are some limitations but works for most cases.



Romain Manni-Bucau
@rmannibucau <https://twitter.com/rmannibucau> |  Blog
<http://rmannibucau.wordpress.com> | Github <https://github.com/rmannibucau> |
LinkedIn <https://www.linkedin.com/in/rmannibucau> | Tomitriber
<http://www.tomitribe.com> | JavaEE Factory
<https://javaeefactory-rmannibucau.rhcloud.com>

2016-05-25 10:14 GMT+02:00 rubin@xs4all.nl <ru...@xs4all.nl>:

>
> Hi OpenEJB/TomEE Users,
>
> I've recently started using ApplicationComposer in our automated testing
> to great effect but am running into some questionmarks with regards to
> trying to test a javax.servlet.Filter.
>
> Question: is it possible to load a filter in ApplicationComposer? If yes,
> where/how would I go about this?
>
> Kind regards + thanks in advance,
>
>
> Rubin!