在 dwr.xml 中如何从全局过滤器中排除某些类?
可以在DWR(直接网络远程处理)中创建全局过滤器。例如,如果您需要检查用户是否登录,您可以将其写在一个地方 - 过滤器中,在 dwr.xml 中将其指示为全局过滤器:
<allow> .... <filter class="mypackage.MyFilterClass"/> .... </allow>
但是有些类允许用户使用没有身份验证,例如身份验证类本身。我想知道如何在全局过滤器标记中指示我不希望过滤(排除)哪些类?
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)?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
您可以将异常类作为参数传递给您的过滤器。在您的过滤器中,您可以检查此参数并对此类执行 noop。
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.