Ok a quick scan through ack source I found following command line option to get required result
ack --jsp --nogroup -o '(</(div)>)' a.jsp:5:</div> a.jsp:10:</div> b.jsp:3:</div> b.jsp:8:</div>
or
ack --jsp --nogroup --output='$2' '(</(div)>)' a.jsp:5:div a.jsp:10:div b.jsp:3:div b.jsp:8:div