request attribute vs parameter
843841Jun 15 2007 — edited Jun 18 2007Hi all,
I am getting confused of request attribute and request parameter. What i understand is that a parameter is a piece of info that send with the request. Such that infomation (parameter) come from a form component (text field, radiobuttion,selection...). By using servlet.getParameter("my text filed") i can retrieve what user enter into the form.
In the similar maner, if from one servlet, i use request.setAttribute("a message","content of a message") i can also retrive the content of the message from another servlet using getAttribute.
In short, parameter is for form-servlet communication and attribute is for servlet-servlet communication, am i correct? Can I change the parameter of the request from a servlet?
Is there any other different between these 2?
Thai
Message was edited by:
lnthai2002