Win a copy of Murach's Python Programming this week in the Jython/Python forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

Which one is best????  RSS feed

 
Kumaran Sowrirajan
Ranch Hand
Posts: 36
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi friends
I am having one doubt.
I have one jsp.in that i write the database connection coding and database retrieval coding and show it in jsp.
so what my question is if i write the database connection and retrieval as Javabeans and from jsp and i call the beans using jsp:usebean tag.
which one is best whether i have to write the entire coding in jsp itself or i have to write the coding in javabeans.which one is fast.also suppose if i write the tag library for this whether this one is fast when compared to other two things.
i want only the fast one.can u tell me friends which one is fast?
Thanks a lot and appreciated.
regards
Kumaran.S
 
raymond yadao
Ranch Hand
Posts: 88
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
hi!!!
well, in jsp, the presentation is separated from business logic. so as much as possible avoid to embed java code to your jsp programs. you could put your business logic to a javabeans(database connection etc) and just call it to your jsp page using jsp:useBean>. regarding the speed, you must use connection pooling for connecting to the database. i think there are programs(connection polling) that can be downloaded. try to search for it.
hth!

raymond
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!