从jax-ws Web服务获取参数
问题描述:
我想从Web服务(jax-ws)中的文件中检索字符串参数。我已经看到,我无法使用FacesContext从web.xml读取参数。 此代码不起作用:从jax-ws Web服务获取参数
fc = FacesContext.getCurrentInstance(); String fileOpzionali = fc.getExternalContext()。getInitParameter(“fileOpzionali”);
建议?
感谢
答
你有没有在你的web.xml这样一个对应的条目:
<context-param>
<param-name>fileOpzionali</param-name>
<param-value>VALUE</param-value>
</context-param>
?
@idarios那么它应该工作,我认为。尝试获取ServletRequest并获取参数,例如request.getSession()。getServletContext()方法... – planetjones 2011-05-18 14:16:33