|
I have a bean I’m putting in the client session that I
use to access the db… In my web application, I use other beans that need
to query the db and that should do it using the session bean… all these
other beans are called in jsp pages. My question is, how can I have my
beans accessing methods in the session bean? I can’t figure this out…
Should I somehow pass the session bean’s handler to the other beans? How
would I do this?? One more thing… I keep reading about keeping logic inside beans and using jsp only for layout… Would a query inside a jsp page
(without any connection creation or driver registering, I use the session bean
to get that) returning a resultset and then iterating
this escape from this structuring? I mean, I could do
the query and keep the resultset inside beans, but
then I would have a lot of work for something I can easily do inside a jsp page. And I would have to iterate the data in the bean anyway, the only thing is I wouldn’t have the resultset directly in the jsp
page!! Thanks in advance… Ricardo Rocha |
