Question

There is possibility to make global filter in DWR (direct web remoting). For example if you need to check if user is logged in, you write it in one place - in filter, that is indicated it in dwr.xml as global filter:

<allow>
  ....
  <filter class="mypackage.MyFilterClass"/>
  ....
</allow>

But there are classes that user is allowed without authentication, for example authentication class itself. I want to know how to indicate in global filter tag what class or classes I want not to be filtered (excluded)?

Was it helpful?

Solution

You can pass the exceptional class as parameter to your filter. In your filter you can check against this parameter and do noop for this class.

<filter class="org.mypackage.MyFilter">
  <param name="excluded" value="org.mypackage.MyClass"/>
</filter>
Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top