I am implementing small application called 'PhoneBook'. I got stuck at one small problem. When my first jsp page loads i want some database values to be retrieved and to be sent to same jsp page. I tried on my jsp page; where view.do will be mapped on controller method which will call dao class method which retrieves database values. and then controller sends this list to same jsp. Now what happening is when jsp receives the data from controller it again sends the request to controller; as it has and this is an infinite loop. My question is how to control this loop...
first jsp page
Well when someone navigates to view.do it looks like you are making your query populating a list with those entities and returning a view. In that view you have access to those objects you queried. There is no need to go and get them later.