Try to use JSTL & EL instead of Scriplet elements. For database access use JSTL SQL Tag library or it's better to move the database code in the Servlet.
Try with the CSS Input Radio checked Property
Sample code:
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"%>
<c:set var="gender" value="female"/>
Male <input type="radio" name="R1"
value="Male" <c:if test="${gender=='male'}">checked</c:if>>
Female <input type="radio" name="R1"
value="Female" <c:if test="${gender=='female'}">checked</c:if>>
Have a look at the similar post
EDIT
For check box values single value its show properly but when it multiple values showing nothing.
check the string using contains method.
sample code:
<c:set var="medium" value="Hindi Kannada" />
English
<input type="checkbox" name="C1"
<c:if test="${medium.contains('English')}">checked</c:if>>
Kannada
<input type="checkbox" name="C1"
<c:if test="${medium.contains('Kannada')}">checked</c:if>>
Hindi
<input type="checkbox" name="C1"
<c:if test="${medium.contains('Kannada')}">checked</c:if>>