•
•
•
•
What is DaniWeb IT Discussion Community?
You're currently browsing the JSP section within the Web Development category of DaniWeb, a massive community of 427,194 software developers, web developers, Internet marketers, and tech gurus who are all enthusiastic about making contacts, networking, and learning from each other. In fact, there are 2,149 IT professionals currently interacting right now! Registration is free, only takes a minute and lets you enjoy all of the interactive features of the site.
Please support our JSP advertiser: Lunarpages JSP Web Hosting
Views: 990 | Replies: 4
![]() |
Hi,
Im trying to modify user information on my site.for this im using java and jsp.when the user enters id,his info stored in db is to be retrieved and displayed in corresponding textboxes.
I know how to access db but dont know how to put the value retrieved into textboxes then edit if desired..and then store back..can you help?..thx
Im trying to modify user information on my site.for this im using java and jsp.when the user enters id,his info stored in db is to be retrieved and displayed in corresponding textboxes.
I know how to access db but dont know how to put the value retrieved into textboxes then edit if desired..and then store back..can you help?..thx
•
•
•
•
Hi,
Im trying to modify user information on my site.for this im using java and jsp.when the user enters id,his info stored in db is to be retrieved and displayed in corresponding textboxes.
I know how to access db but dont know how to put the value retrieved into textboxes then edit if desired..and then store back..can you help?..thx
First Retreive the values from database and store it in temporary variables
Now Consider a Text box whose html code is
<input type="text" name="txtUser" />
For Ex. consider user name is retreived from db
In order to assign a user string value, do this..
<input type="text" name="txtUser" value="<%=user%>" />
Now the text box will display the User name retreived from database....
For Editing,
Just get the variables in the server file using request.getParameter() method
For Ex. to get the user name use
String user = request.getParameter("txtUser");
Similarly get all the variables necessary to store it in database and update it in database....
oh and one more thing..im taking user id in one page and checking if its valid...if so then the record corresponding to it is to be displayed in next page..now how would the class know which file to put the retrieved info in?..im taking user id in page1 but retrieved record is to be displayed in page2 and edited..
•
•
Join Date: Dec 2004
Location: London or Slovakia
Posts: 2,467
Reputation:
Rep Power: 11
Solved Threads: 296
Use beans and sessions, also please do not connect to DB from JSP use servlet for it. If you need any questions in regard if it just ask...
Learn to see in another's calamity the ills which you should avoid.
Publilius Syrus
(~100 BC)
If we helped you to solve your problem, answered your question please mark your post as SOLVED.
Publilius Syrus
(~100 BC)
If we helped you to solve your problem, answered your question please mark your post as SOLVED.
![]() |
•
•
•
•
•
•
•
•
DaniWeb JSP Marketplace
•
•
•
•
Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
Other Threads in the JSP Forum
- Previous Thread: JSP and Servlet using Tomcat
- Next Thread: need some help plz



Linear Mode