Hi, I wanted to know if it is possible to set a value entered in a text box to be set in a request as a request attribute in the jsp itself while submitting. What I mean is this : I have user name and password fields that the user enters and there are two links to login and registration. If he clicks registration instead of login I want to be able to populate the user name and the password fields in the registration page instead of the user typing it again. I wanted to know what is the value that I need to set in the request attribute so that the user name entered in the text field is set in the request attribute. I wanted to know if it is possible?
No more rhymes! I mean it!<br /> <br />Does anybody want a peanut?
Originally posted by Samanth Marisetty: set req attr in jsp
Please use real words when posting to the forums. Abbreviations such as "req" in place of "request" and "attr" in place of "attribute" only serve to make your posts more difficult to read and less likely to generate useful responses.
I wanted to know what is the value that I need to set in the request attribute so that the user name entered in the text field is set in the request attribute.
There is no magic value that can make this happen, you need to code it yourself. In the case that you mention, simply put the information on the request before forwarding to the page, and have the JSP on the page populate the value attribute of the text fields. [ February 25, 2008: Message edited by: Bear Bibeault ]