Win a copy of The Java Performance Companion this week in the Performance forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Get data from database without processing an entire JSP

 
Dipti Lokhande
Greenhorn
Posts: 9
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Can anyone tell me How to display data from database without processing the entire JSP? Please if you give any example which will help me out to solve my issue.

Thanks in advance.
 
Ulf Dittmer
Rancher
Posts: 42968
73
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
What does "without processing the entire JSP" mean? If parts of the JSP code shouldn't be executed you can wrap them inside an if statement with an appropriate condition. Generating output based on Db values can be done anywhere in a JSP page, so that's not a constraint.

Note that it's considered bad design to keep DB code in a JSP; at the very least, move it into a backing bean.
 
Ben Souther
Sheriff
Posts: 13411
Firefox Browser Redhat VI Editor
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Do you mean 'without refreshing the page in your browser'?
If so, the term you want to use when searching is AJAX.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic