禁用OPTIONS请求的自动Wadl生成 [英] Disable automatic Wadl Generation for OPTIONS request
本文介绍了禁用OPTIONS请求的自动Wadl生成的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
每次收到OPTIONS请求时,我都无法在Jersey禁用自动Wadl生成.我尝试将以下内容添加到web.xml中的servlet配置中,但是它不起作用:
I'm having trouble disabling automatic Wadl Generation in Jersey every time an OPTIONS request is received. I've tried adding the following to the servlet configuration in web.xml but it doesn't work:
<init-param>
<param-name>jersey.config.server.wadl.disableWadl</param-name>
<param-value>true</param-value>
</init-param>
任何人都可以帮忙吗?
推荐答案
我自己也遇到了这个问题,看来您需要确保大写正确才能起作用: com.sun.jersey. config.feature.DisableWADL .将此条目放在jersey-servlet <servlet>
部分的web.xml文件中.
Just ran into this problem myself and it looks like you need to make sure the capitalization is correct for it to work: com.sun.jersey.config.feature.DisableWADL. Put this entry in your web.xml file in the jersey-servlet <servlet>
section.
<init-param>
<param-name>com.sun.jersey.config.feature.DisableWADL</param-name>
<param-value>true</param-value>
</init-param>
这篇关于禁用OPTIONS请求的自动Wadl生成的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文