hi,
Your question was :-
>>why is it that getParameterValues is there only in HttpServletRequest and not in ServletContext?
Cheak out the return type of the getParameterValues() .It's an array of String . As we know that request stores it's attributes in Map where key is a String and value is a object . Those are generated during run time .
>>What if I want to associate multiple values with the same name in Context?
Multiple values you can't add since ServletContext also uses Map to store it's Attributes . And it has to be a Key value pare .
Ya .......You can do one thing ..... Using ServletContextListener you can add object in ServletContext. In that way you can put a collection of object in ServletCotext also. Now as you was getting a bunch of objects in getParameterValues(), you can do the same here .
SCJP(1.4)
Preparing(SCWCD)