I am writing a small test program w/JAX-RS in order to familiarize.
The goal is just to display a number of init parameters as set in the web.xml file.
The problem is that I just cannot make a call to GetinitparameterNames(). Probably, this is because I just do not understant the "Context" annotation. Can someone enlight me ?
Not sure I understand you. If you mean to use ServletConfig at the GET stage, it does not work either.
Thanks anyway
P
Ulf Dittmer
Marshal
Joined: Mar 22, 2005
Posts: 35428
9
posted
0
No, I don't mean as part of any method call - I mean an instance variable, like I wrote it.
Looking at the web.xml, it doesn't contain context parameters, so it's not surprising that cnt2 is 0.
As to using ServletConfig, it should be used to supply parameters to the JAX-RS engine, not to your code, so I would advise against using that in any case.
I agree. Here's the link: http://ej-technologies/jprofiler - if it wasn't for jprofiler, we would need to
run our stuff on 16 servers instead of 3.