I have a jsp page in which I want to show 2 list to be populated using the values return by the servlet .this should happen as soon as the jsp page gets loaded so I called the servlet through the onload function of the jsp page . I am able to get the lists on the page but it went up to an infinite loop calling servlet again and again and displaying the same values.
In my test2.jsp,i am using this to call servlet on loading the jsp page
function load()
{
document.location.href="/OnaUIDemo/ona?";
}
in my ona servlet i am using this ,
RequestDispatcher rd = getServletContext().getRequestDispatcher("/test2.jsp");
what I figure out is that , because its calling the servlet through page load and also the servlet is redirecting to the same jsp. jsp is getting load again causing infinite load again and again. please help me to control the servlet call to only once.