Win a copy of Re-engineering Legacy Software this week in the Refactoring forum
or Docker in Action in the Cloud/Virtualization forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

check boxes retrieving problem

 
mallikarjun dontamsetti
Ranch Hand
Posts: 246
Firefox Browser Oracle
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Actually i am not sure weather i have to ask this question in jsp or JDBC forum please help me... with this problem

I am using jstl in jsp and to display the data which is already in database and my problem is there are some check boxes are ther in jsp those have to display the data when page is loaded. The related column in DB is STD_COURSE which has courses like java,.net,c,cpp...multiple in a single column,I don't have any idea how to get and chck which one is checked.....


my code is

editstudent.jsp

my query is

my problem is how to get data when different courses are there ?
The code i have written is not working if the first condition is true then it is not displaying boxes in next tr

 
Madhan Sundararajan Devaki
Ranch Hand
Posts: 312
Java MS IE
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Is the table containing STD_COURSE a master/reference/read-only table?

Ideally, you should have the following tables, STUDENT_MASTER, COURSE_MASTER and STUDENT_COURSE_MAPPING.

STUDENT_MASTER = Student Details + Student ID
COURSE_MASTER = Course Details + Course ID
STUDENT_COURSE_MAPPING = Student ID + Course ID

Now, the STUDENT_COURSE_MAPPING table will contain Student ID, Course ID rows, for each student mapped to multiple courses.

Query this table to find the courses mapped and then in your front-end select/un-select the checkboxes appropriately.
 
mallikarjun dontamsetti
Ranch Hand
Posts: 246
Firefox Browser Oracle
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thanks for reply Madhan Sundararajan Devaki
I solved it
my code is

Now my problem is i have to check the each time(repeat the c:forEach loop) i don't want that is there any simple way for comparring the string
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic