Hello,
Could someone help me understand the following
situation?
I have two servlets (s1 and s2) and one jsp (j1).
If I do this in s1:
request.setAttribute("str1", "Hello");
then forward to s2:
...forward(request,response);
In s2 I do this:
request.setAttribute("str1", "So Long");
then forward back to s1:
...forward(request,response);
Now I do this:
String str = request.getAttribute("str1");
str now contains "Hello" not "So Long".
But, if I do this in s1:
request.setAttribute("str1", "Hello");
then forward to s2:
...forward(request,response);
In s2 I do this:
request.setAttribute("diff1", "Different");
then forward to the jsp (j1):
...forward(request,response);
Now I do this in j1:
String str = request.getAttribute("diff1");
str contains "Different".
Is the request suppose to allow me to change it
after I forward? Or am I not allowed to change
stuff already bound to the request, but I can
bind new stuff?
Thanks for any insight.
__________________________________________________
Do You Yahoo!?
Get email at your own domain with Yahoo! Mail.
http://personal.mail.yahoo.com/?.refer=text