Hi
Am assuming that the HttpRequest lifetime is limitd to service method. Look at the code below :
getTestVector().add("Str1");
getTestVector().add("Str2");
getTestVector().add("Str3");
req.setAttribute("StrVector",getTestVector());
RequestDispatcher reqDisp = req.getRequestDispatcher("/jsp/testVectJSP.jsp");
reqDisp.forward(req,res);
and in the jsp am retrieving the StrVector object from request using JSTL c:forEach.
<c:forEach var="item" items="${StrVector}">
The value in vector is <c

ut value = "${item}"/> <br/>
</c:forEach>
The problem is everytime I reload the page on the browser, the reuslt shows cumulative repetitions of the objects in the vector.
The result when loaded thrice is: (and it increments everytime I relaod)
The value in vector is testVect1
The value in vector is testVect2
The value in vector is testVect3
The value in vector is testVect1
The value in vector is testVect2
The value in vector is testVect3
The value in vector is testVect1
The value in vector is testVect2
The value in vector is testVect3
My expectation is to have just:
The value in vector is testVect1
The value in vector is testVect2
The value in vector is testVect3
With hashtable it just prints one set but not with vector. Any specific reason ? What am I missing here ? Doesnt the request refresh everytime its invoked ?
Note: I even tried to removeAttribute("StrVector") before setting but that has no effect too.
Environment: win2K, weblogic8.1
Thanks
RS