In the online manual
http://java.sun.com/products/servlet/2.2/javadoc/index.html I can read:
This (setAttrbibute) method is most often used in conjunction with RequestDispatcher.
On the page
http://java.sun.com/products/servlet/2.2/javadoc/index.html I can read (concerning the RequestDispatcher include method):
<bold>The request and response parameters must be the same objects as were passed to the calling
servlet's service method. </bold>
This seems to me a contradiction. Following code will not work:
...
request.setAttribute("id","prog");
request.setAttribute("action","add");
RequestDispatcher rd = request.getRequestDispatcher("counter");
rd.include(request,response);
...
The counter servlet will NOT have in its request object the 2 added parameters.
Do I miss something ?
Stefan