Hello Ranchers!!! Here i'm doing a project with jsp and oracle.. Now what i want do is.. i want to search a particular name.. it is searching. and displaying the details.. in another page.. now..i added a new hyperlink "Edit contact details" when i click that hyperlink.. it is opening another page.. there 4 text boxes are there!!
the fields in the database should be taken.. to that textboxes.. fields are name , address, email, phone..
how can i get the details of the particular person.. in the text box..
name to search = rony next page!! rony trivandrum firstname.lastname@example.org 2222222 <edit details>
here edit details is hyper link..
when i press that link..
these details displaying here should seen in next page in each text boxes..
when i press the submit button.. i have to call the Update table Query..
but my problem is i cannot .. get the fields in textbox!!
I think you have to use a key to retrieve the information for each person. Let's say you keep the users information in a map (key is string, value is information bean). Let's assume that this map is in the session.
We have two users in our database. We use a map to store their information :
<edit details> is a hyperlink, right ? Let's say it points to "details.jsp" Then you could do : <a href="/details.jsp?key=AAA">edit details</a> <a href="/details.jsp?key=BBB">edit details</a> and so on.
In details.jsp, you retrieve the selected user's key, from the request parameters (parameter name is 'key'). You then use the key to retrieve the user information which is still in the session, and display it in each textbox.