dear all the following is a brief description of my exercise.(am a beginner to jsp and trying hard to master it) there are a list of 20 items with checkboxes.items are stored in the database.when i click on the link called show list it will show all 20 items.i may check 5,10 or 15 items and submit it.the jsp will process that list and show only the selected ones. the number of items selected may vary from session to sesion any one who could be able to throw some light into it
Joined: May 10, 2001
premraj Welcome to the Java Ranch, we hope you�ll enjoy visiting as a regular however, your name is not in keeping with our naming policy here at the ranch. Please change your display name to an appropriate name as shown in the policy. Thanks again and we hope to see you around the ranch!!
As far as your question goes, have you tried anything for it yet. Let us know what you ahve so far and what you are stuck on then we can help you out. If your stuck at the very beginning then try to figure out what you need to do. From your description it sounds like you need to give the user a page that contains all of the items from the database listed as checkboxes. so you need to: Create a JSP or servlet (this sounds more like a job for a servlet - unless it's homeowrk and you have to use a JSP). If it has to be a JSP can you use a bean? After you have the inital page created then add code to access the database and get the list of items. Loop through the list of items and add each one to the page as a checkbox. After the user selects howevermany they want to then have the page submit to another servlet/JSP that checks all of the items fromt he ifrst and only displays the checked ones. That's a rough outline of what you need to ge started, if you have any code already let us know or if it is a specific part that you need help with.
Joined: Nov 27, 2001
Have you followed this link? It's got some check boxes and it's pretty much the same of what you're explaining.. it might help. cheers
I'm not going to be a Rock Star. I'm going to be a LEGEND! --Freddie Mercury
Joined: Jun 04, 2002
hi dave i started doing exactly what you have told.the following is my code for displaying all the listings from the database.now i want to check only a selected few and show only those things. thanx prem