-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Chris,

Chris Richmond wrote:
| 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.

Sounds good.

| 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>

Rest assured... this is a reasonable choice for configuring your webapp.
There is a thread on this list right now where some folks are arguing
over how best to do this (see thread "Best practice? configuration of a
web application"). <context-params> in web.xml is as good as any method IMO.

| And I want to access it from any of my classes within my web service.

Okay. What have you tried? What container objects do you have access to?
Can you get to the request?

| 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.

You could use <env-entry> instead, and then those settings would be
available via JNDI (which you can get to from anywhere) instead of
through the ServletContext (which you might not have available).

- -chris
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.9 (MingW32)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org

iEYEARECAAYFAkg+yGMACgkQ9CaO5/Lv0PArpQCglc5w9UVy9XcqOBzjZVeD5pvm
/ngAnijcF+3cMHQPsgsW8rXGQyghjxdT
=TBt0
-----END PGP SIGNATURE-----

---------------------------------------------------------------------
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to