You could do it in the following way:
suppose you have the checkbox
if the checkbox is checked, when you submit your form you get a request parameter c1=1 and, you tell me, you store that value in a table of a database
When you retrive the value of c1 from the database where do you put it before you invoke your
jsp again? In a bean perhaps?
if it is a bean let's call it
yourbean.
Set for example a request attribute with that bean in your
servlet:
and look at the value of c1 in you bean when you are building your checkbox again