Hello all,
I have created a web service using JAX-WS and deployed my .war and it runs
fine, but now I want to convert some hard-coded config values to read values
from the WEB-INF/web.xml file that was created/deployed.
I have addes something like the following to my web.xml:
<context-param>
<description>test context param</description>
<param-name>testParam</param-name>
<param-value>my value</param-value>
</context-param>
And I want to access it from any of my classes within my web service. Now I
realize I could access this using context related calls in a JSP page or
something, but seeing as how mine are regular classes that are not JSP pages
and simply have JAX-WS annotations, I was thinking I would have to use a
more genereric container approach to finding these values.
Perhaps I shouldn't be using <context-param> at all, but some other type of
entry in web.xml? In either case, I can't seem to figure out how to locate
and use an entry like that from within any class in my JAX-WS web service.
Perhaps my approach is entirely wrong on this? Am I approaching this in
the right way, and if so, how do I read values from web.xml and if not, what
should I be doing?
Thanks,
Chris