There are number of ways you can achieve this ..
- Either you can populate the data in service method
com.Teklabz.Servlets.IndexServlet
and then set the data inrequest
attribute and then forward to thatjsp
. - If you want to use
loadonstartiup
then you can populate the data from db incom.Teklabz.Servlets.IndexServlet
servlet'sinit
method and then set it in some accessible scope(request,session,context)
and by direct accessing jsp get the data from that scope. - In listener also you can do this but in that case also you need to set the data in some scope.