File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
The moose likes JSP and the fly likes Get data from database without processing an entire JSP Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » JSP
Bookmark "Get data from database without processing an entire JSP" Watch "Get data from database without processing an entire JSP" New topic
Author

Get data from database without processing an entire JSP

Dipti Lokhande
Greenhorn

Joined: May 05, 2007
Posts: 9
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
Marshal

Joined: Mar 22, 2005
Posts: 41601
    
  55
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.


Ping & DNS - my free Android networking tools app
Ben Souther
Sheriff

Joined: Dec 11, 2004
Posts: 13410

Do you mean 'without refreshing the page in your browser'?
If so, the term you want to use when searching is AJAX.


Java API J2EE API Servlet Spec JSP Spec How to ask a question... Simple Servlet Examples jsonf
 
It is sorta covered in the JavaRanch Style Guide.
 
subject: Get data from database without processing an entire JSP