| Author |
Getting database values on loading first jsp page
|
renu sogi
Greenhorn
Joined: Feb 06, 2012
Posts: 15
|
|
Hi!
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
controller class
dao class
thanks in advance...
|
 |
Bill Gorder
Bartender
Joined: Mar 07, 2010
Posts: 1282
|
|
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.
do something like this:
|
[How To Ask Questions][Read before you PM me]
|
 |
 |
|
|
subject: Getting database values on loading first jsp page
|
|
|