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 data from servlet to jsp Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » JSP
Bookmark "data from servlet to jsp" Watch "data from servlet to jsp" New topic
Author

data from servlet to jsp

ganesh narayana
Greenhorn

Joined: Sep 10, 2005
Posts: 7
i have nearly 500 records in a resultset, which is generaged by a servelt, now i want to display all this 500 records using a jsp.

please tell me how to pass this data to a jsp, and how to receive information in jsp.

thanku....
Ben Souther
Sheriff

Joined: Dec 11, 2004
Posts: 13410

If you store all of these values in a List of row beans, you can bind the list to request (or session) scope and then iterate through the list using JSTL.


Java API J2EE API Servlet Spec JSP Spec How to ask a question... Simple Servlet Examples jsonf
Ben Zung
Ranch Hand

Joined: Mar 25, 2004
Posts: 109
I don't understand then -- you can get the resultset (with 500 rows) from the servlet, what prevents you from getting it directly from the JSP?
Bear Bibeault
Author and ninkuma
Marshal

Joined: Jan 10, 2002
Posts: 61413
    
  67

Originally posted by Ben_zr ung:
what prevents you from getting it directly from the JSP?


Writing good code?


[Asking smart questions] [Bear's FrontMan] [About Bear] [Books by Bear]
Bear Bibeault
Author and ninkuma
Marshal

Joined: Jan 10, 2002
Posts: 61413
    
  67

"Ben_zr ung",

There aren't many rules that you need to worry about here on the Ranch, but one that we take very seriously regards the use of proper names. Please take a look at the JavaRanch Naming Policy and adjust your display name to match it.

In particular, your display name must be a first and a last name separated by a space character, and must not be obviously fictitious.

Thanks!
bear
JavaRanch Sheriff
Ben Zung
Ranch Hand

Joined: Mar 25, 2004
Posts: 109
Bear, hope this is not a violation of the rule now with my middle name zr omitted.
Thanks
Bear Bibeault
Author and ninkuma
Marshal

Joined: Jan 10, 2002
Posts: 61413
    
  67

Middle name would be fine. It was the underscore that was the problem. Thanks for adjusting.
 
 
subject: data from servlet to jsp