posted 18 years ago
Hello all
I tried the following just out of curiosity.
In JSTL we have "target" attribute in <c:set> tag. "c" is just a prefix used over here for example.This "target" accepts maps or beans as a value.
Map map = new Hashtable();
map.put("A","A");
map.put("B","B");
map.put("C","C");
map.put("D","D");
request.setAttribute("map",map);
then I used the following sentence
<c:set target="${map}" property="Hello" value="bye"/> The key value pair was successfully added to map. However I tired using "requestScope" object which is also a map but is an implict EL object
<c:set target="${requestScope}" property="Hello" value="bye"/>
However I got exception at runtime. Am I not allowed to make an entry in requestScope using <c:set> tag ?
Waiting for your suggestions.
Regards
Rohit.
[ November 30, 2005: Message edited by: Rohit Bhagwat ]